moonsharp icon indicating copy to clipboard operation
moonsharp copied to clipboard

Winrt (Windows Store App) not working with version 2.0

Open raV720 opened this issue 9 years ago • 2 comments

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:

  1. Create Windows Store App 8.1
  2. Install Moonsharp 2.0 from nuget
  3. Test method to MainPage code behind: private void Test() { MoonSharp.Interpreter.Script script = new MoonSharp.Interpreter.Script(); }
  4. Call this method from constructor of MainPage
  5. Run and see exception
  6. Downgrade moonsharp to 1.8 - exception disappears

raV720 avatar Nov 30 '16 12:11 raV720

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.

bplu4t2f avatar Feb 11 '17 12:02 bplu4t2f

When will it be fixed?

raV720 avatar Feb 22 '17 14:02 raV720