Search Unity

Cannot Build Win 10 .NET (Il2CPP works, as does 8.1 .NET)

Discussion in 'Windows' started by jotapeh_, Mar 15, 2016.

  1. jotapeh_

    jotapeh_

    Joined:
    Nov 16, 2012
    Posts:
    45
    See title. For some reason, whenever I build a Win 10 Universal app using the Mono 2x or Win RT Dot NET scripting backends, I cannot compile the final product in Visual Studio. I receive thousands of errors implying that it does not even recognize basic data types, eg:

    Code (csharp):
    1.  
    2. Severity    Code    Description    Project    File    Line    Suppression State
    3. Error    CS0518    Predefined type 'System.String' is not defined or imported    Sound Box    C:\Users\devel_000\AppData\Local\Temp\.NETCore,Version=v5.0.AssemblyAttributes.cs    3    Active
    4.  
    Windows 10 Universal Il2CPP builds work great, however I need to work with some native Win 10 features and would really rather deal with a c# project than a C++ one.

    Windows 8.1 Universal (Win RT dot Net scripting backend) works great, too, and previous C# builds worked fine in Unity 5.1.x


    edit: Win 10 .NET builds work only in Debug mode, apparently. I will do some more digging to find out why this is
     
    Last edited: Mar 15, 2016
  2. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,916
    Try creating Universal 10 app from VS 2015 menu, see if it works there. I am guessing you may have NuGet packages restoring disabled, check from VS 2015 menu, Tools->Nuget Package Manager->Package Manager Settings.

    Package Restore checkboxes should be set.