Search Unity

mcs.rsp and facade assemblies - Unity builds, VS not

Discussion in 'Scripting' started by Brice-xCIT, May 3, 2018.

  1. Brice-xCIT

    Brice-xCIT

    Joined:
    Jun 22, 2017
    Posts:
    5
    Hello! I've got a project on 2018.1.0f2 that depends on the namespace System.ComponentModel.Annotations (located in System.ComponentModel.DataAnnotations.dll).

    I'm using an mcs.rsp file at the root of the Assets/ folder, with the following:

    Code (CSharp):
    1. -r:System.ComponentModel.DataAnnotations.dll
    It seems to work well in Unity, but the generated project in Visual Studio only references the facade assembly
    Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ComponentModel.Annotations.dll
    , not the assembly I was expecting
    Editor\Data\MonoBleedingEdge\lib\mono\4.7.1-api\System.ComponentModel.DataAnnotations.dll
    .

    Am I missing something here? :)
     
  2. Brice-xCIT

    Brice-xCIT

    Joined:
    Jun 22, 2017
    Posts:
    5
    If anyone ever needs an answer to this, here's how I fixed the problem: I switched the project to use .NET Standard 2 api level, which removed the facade from the VS project. Then I could add the netstandard2 DLL for this assembly, downloaded from the official Microsoft package on Nuget. This will work for now.