Winrt (Windows Store App) not working with version 2.0
Moonsharp in version 2.0 does not work on Winrt platform. During starting app there is an exception:
An exception of type 'System.IO.FileNotFoundException' occurred in MoonsharpTest.exe but was not handled in user code
Additional information: Could not load file or assembly 'System.Runtime, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
Steps to reproduce:
- Create Windows Store App 8.1
- Install Moonsharp 2.0 from nuget
- Test method to MainPage code behind:
private void Test() { MoonSharp.Interpreter.Script script = new MoonSharp.Interpreter.Script(); } - Call this method from constructor of MainPage
- Run and see exception
- Downgrade moonsharp to 1.8 - exception disappears
You've probably figured this out already but the problem is that it's adding the "netcore" dll to your project references, when it should add the "portable" dll.
To fix it, remove the project reference to Moonsharp.Interpreter, and add a new reference to (SolutionDir)\packages\MoonSharp.2.0.0.0\lib\portable-net4+sl5+wp8+win8\MoonSharp.Interpreter.dll.
When will it be fixed?