Real-Serious-Games / C-Sharp-Promise

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

Error when building for Hololens #73

Closed RonNabuurs closed 6 years ago

RonNabuurs commented 6 years ago

After building my Unity project for the Hololens this packages breaks.

In the Unity editor it works fine. I included the dll in my assets/packages folder. I'm using Unity 2017.3.1p1. I also tried installing the package via Nuget, but I still get an error.

Severity    Code    Description Project File    Line    Suppression State
Error   CS0012  The type 'IPromise<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'RSG.Promise, Version=3.0.0.0, Culture=neutral, PublicKeyToken=7019fe0722eef3a4'.
RoryDungan commented 6 years ago

I think Hololens uses Universal Windows Platform instead of Mono/.NET 3.5. Since the DLL is set up to compile for .NET 3.5, you may need to recompile it for UWP. Alternatively, you can just try copying the .cs files from the root of your repository directly into your Assets folder instead of using the DLL.

RoryDungan commented 6 years ago

In future it would be good to distribute packages built for UWP and .NET Core via Nuget in addition to .NET 3.5. There was a pull request for that functionality at one point (#26), but it never got finished.

RoryDungan commented 6 years ago

Closing because the current version of the Nuget package now includes a build for .NET Standard 2.0, which supports UWP.