Error: Unable to generate deps.json, it may have been already generated. when adding a Service reference to Xamarin forms

匆匆过客 提交于 2020-04-30 12:32:31

问题


i have a Xamarin forms v3.1 project with the .net standard approach, i try to add a reference to a web service i have using add connected service and then from the pop up i choose microsoft web service reference provider. i add the web service link and visual studio (2017 v15.8) discovers its structure then when i click finish it takes a while then shows this error:

Unable to generate deps.json, it may have been already generated.
You can specify the "-d" option before the tool name for diagnostic output (for example, "dotnet -d ": C:\Program Files\dotnet\sdk\2.1.400\Sdks\Microsoft.NET.Sdk\targets\GenerateDeps\GenerateDeps.proj Done.

any idea why this is happening and how to solve this issue


回答1:


When I add a service reference to a regular.net core web application, I got the same error. After the investigation I came to know that, somehow svcutil was not installed. Once I installed svcutil using Nuget Package Manager (Install-Package dotnet-svcutil), this issue resolved.

More details about .net core and svcutil : Ref : https://docs.microsoft.com/en-us/dotnet/core/additional-tools/dotnet-svcutil-guide




回答2:


for a .net core 2 application you cannot install dotnet-scvutil ver 2.0.1. For me it worked with ver 1.0.4 After you install this you need to update rest of the NuGet packages except dotnet-svcutil.

Good luck




回答3:


I went through this same problem for days. It just worked by running the "dotnet restore" command in VS 2019.

Good luck



来源:https://stackoverflow.com/questions/52545028/error-unable-to-generate-deps-json-it-may-have-been-already-generated-when-ad

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!