Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Setting up a C# project within Unity's generated solution to be used as an assembly

Discussion in '2017.2 Beta' started by TFlippy, Jul 6, 2017.

  1. TFlippy

    TFlippy

    Joined:
    Nov 12, 2014
    Posts:
    27
    I'm trying to set up a new C# project (Class Library Portable), but after referencing the other project I still get errors whenever I try to use attributes or similiar objects replaced by Mono.

    Code (CSharp):
    1. The type 'Attribute' is defined in an assembly that is not referenced. You must add a reference to assembly 'mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
    Adding a reference to mscorlib.dll inside Unity 2017.2.0b2\Editor\Data\MonoBleedingEdge\lib\mono\4.6.2-api\ ends up killing the project completely, as now there are missing references to pretty much everything.

    Is there any way how to properly set up a project for the new AssemblyBuilder?
     
  2. rastlin

    rastlin

    Joined:
    Jun 5, 2017
    Posts:
    127
    Don't use Portable Class Library project type, it's not meant to be used with Unity.

    Use just regular Class Library project type.