简体   繁体   中英

Windows Runtime Component can't load Newtonsoft.Json lib

I have a project with 2 solutions: 1. Universal JS App(Win10); 2. Windows Runtime Component(C#); I try to add the Newtonsoft.Json lib to C# solution; Code in WRP lib:

class Class1
{
    public string Test()
    {
          Newtonsoft.Json.JsonSerializer x  = new JsonSerializer();
          return "Test";
    }
}

Code in js app(default.js):

var testRes = new Test.Class1().test();

When I try to run js app I get an Exception:

System.IO.FileNotFoundException: Could not load file or assembly 'Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The system cannot find the file specified.

What can I do?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM