4

I have a Xamarin forms v3.1 project with the .NET standard approach. I tried 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, Visual Studio (2017 v15.8) discovers its structure, and then when I click finish, it takes a while but 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?

TylerH
  • 20,799
  • 66
  • 75
  • 101
a.tolba
  • 137
  • 1
  • 1
  • 13
  • is there already a deps.json file somewhere in your folder structure? – Jason Sep 27 '18 at 20:59
  • no, there is no deps.json in xamarin forms projects – a.tolba Sep 27 '18 at 21:01
  • Possibly a permissons error: some bugs filed [here](https://github.com/dotnet/sdk/issues/2128) and [here](https://github.com/dotnet/cli/issues/8981). Post suggesting that opening up pemissions to directory may [work](https://github.com/dotnet/cli/issues/8981#issuecomment-378404548) – Andrew Sep 27 '18 at 21:55
  • i tried adding permissions for everyone account on the sdk folder but the issue still happens – a.tolba Sep 27 '18 at 22:43

4 Answers4

3

Execute tool-line command:

dotnet tool install --global dotnet-svcutil
edosoft
  • 17,121
  • 25
  • 77
  • 111
julio
  • 31
  • 1
2

What worked for me was running the "dotnet restore" command in VS 2019.

TylerH
  • 20,799
  • 66
  • 75
  • 101
0

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://learn.microsoft.com/en-us/dotnet/core/additional-tools/dotnet-svcutil-guide

Jomy John
  • 6,308
  • 4
  • 28
  • 32
0

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.

TylerH
  • 20,799
  • 66
  • 75
  • 101
Victor
  • 71
  • 1
  • 1