在VS2015中添加 - > REST API客户端...命令失败

Yan*_*hen 8 rest json.net visual-studio-2015

我想在我的UWP项目中添加一个RESTful API.但是,在Add-> REST API Client对话框中单击OK时,我在VS2015中收到以下错误:

Generating client code and adding to project started
Generate client code for REST API with following parameters:
REST API Name: XXXXXX, Base namespace: XXXXXX, Metadata file path: C:\Users\XXXX\AppData\Local\Temp\WebToolsAutoRest\XXXXXX\201612291330467450\swagger.json
Exception: 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.
Generating client code and adding to project failed
Adding REST API client for failed
Run Code Online (Sandbox Code Playgroud)

我发现有人在这里遇到同样的问题.但似乎他没有找到解决这个问题的办法.蚂蚁指针?

提前致谢.

Man*_*lla 8

我在vs2015上也看到了同样的事情(尽管我只安装了2015).显然,解决方法是将Newtonsoft.Json.dll复制并粘贴到文件夹路径C:\ Program Files(x86)\ Microsoft Visual Studio 14.0\Common7\IDE中

我确保使用NuGet下载7.0.1版本.

https://github.com/Azure/azure-sdk-for-net/issues/2587

  • 版本7.0.1中的Newtonsoft.Json可以在这里找到https://www.nuget.org/api/v2/package/Newtonsoft.Json/7.0.1.我将newtonsoft.json.7.0.1.nupkg\lib \net45 \复制到C:\ Program Files(x86)\ Microsoft Visual Studio 14.0\Common7\IDE和客户端生成再次工作 (2认同)