Search Unity

[FIXED] Unity cannot find System.Runtime for stub dlls

Discussion in 'Windows' started by GarthSmith, Dec 13, 2015.

  1. GarthSmith

    GarthSmith

    Joined:
    Apr 26, 2012
    Posts:
    1,240
    I'm attempting to build and use a UWP plugin with Unity. I'm creating a stub DLL for Mono. Unity gives me this error as soon as it is brought into the project.

    When I build, two more errors appear.

    What am I doing wrong with this stub plugin? I'm trying to use 4 versions of this plugin: Mono stub, x86, ARM, and x64. On Unity 5.2.3p3.
     
  2. GarthSmith

    GarthSmith

    Joined:
    Apr 26, 2012
    Posts:
    1,240
    This is the entire code contained in the dll.
    Code (csharp):
    1. using System;
    2.  
    3. namespace WinFacePlugin
    4. {
    5.     public static class Face
    6.     {
    7.         public static void Initialize( Action<Action> winThreadRunner, Action<Action> unityThreadRunner ) {
    8.             // Editor stub.
    9.         }
    10.  
    11.         public static void Login( Action<bool, string> callback ) {
    12.             // Editor stub.
    13.         }
    14.     }
    15. }
     
    Last edited: Dec 13, 2015
  3. GarthSmith

    GarthSmith

    Joined:
    Apr 26, 2012
    Posts:
    1,240
    The error was because I made my stub .dll using a Windows Universal project. targeting .NET 4.6.1.

    I changed to making a "Classic Desktop" library project, and set my target framework to "Unity 3.5 .net Subset Base Class Libraries". There were a few Unity options, not sure which one is the best to pick.
     
  4. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    3,735
    Any desktop version of .NET with 3.5 profile should do fine.