Real-Serious-Games / C-Sharp-Promise

Promises library for C# for management of asynchronous operations.
MIT License
1.2k stars 149 forks source link

Error building: dll is not allowed to be included or could not be found. #83

Closed neoshamangames closed 6 years ago

neoshamangames commented 6 years ago

ArgumentException: The Assembly netstandard is referenced by RSG.Promise ('Assets/RestClient/Packages/RSG.Promise_netstandard.dll'). But the dll is not allowed to be included or could not be found. UnityEditor.AssemblyHelper.AddReferencedAssembliesRecurse (System.String assemblyPath, System.Collections.Generic.List1 alreadyFoundAssemblies, System.String[] allAssemblyPaths, System.String[] foldersToSearch, System.Collections.Generic.Dictionary2 cache, BuildTarget target) (at C:/buildslave/unity/build/Editor/Mono/AssemblyHelper.cs:155) UnityEditor.AssemblyHelper.FindAssembliesReferencedBy (System.String[] paths, System.String[] foldersToSearch, BuildTarget target) (at C:/buildslave/unity/build/Editor/Mono/AssemblyHelper.cs:195) UnityEditor.BuildPlayerWindow:BuildPlayerAndRun()

I have tried changing my API Compatibility Level to .NET 2.0 but to no avail.

RoryDungan commented 6 years ago

Looks like you may be using the wrong DLL for the .NET runtime version you've selected in Unity.

Open Project settings -> Player settings and check what the scripting runtime version is set to. If it is ".NET 3.5 Equivalent" then make sure you are using the version of the DLL for .NET 3.5. If scripting runtime version is set to ".NET 4.x Equivalent" and Api Compatibility Level is set to ".NET 4.x" you can use either version of the C# promise DLL, but if Api Compatibility Level is set to ".NET Standard 2.0" then you must use the .NET Standard version of the dll.