0

I followed many ways, here the main two:

Install via Nuget: I have created a dedicated .Net Core 2.1 console application. Adding svutil 2.0.2 via nuget ui i get:

Package 'dotnet-svcutil 2.0.2' has a package type 'DotnetTool' that is not supported by project 'TestWS'.   
    
Invalid project-package combination for dotnet-svcutil 2.0.2. DotnetToolReference project style can only contain references of the DotnetTool type  

Package dotnet-svcutil 2.0.2 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package dotnet-svcutil 2.0.2 supports: netcoreapp2.1 (.NETCoreApp,Version=v2.1) / any 

Install as global tool i run

dotnet tool install --global dotnet-svcutil --version 2.0.2

or

dotnet tool install --global dotnet-svcutil

but got error, possible causes are corporate proxy authentication and i cannot have proxy url to set it up

final goal is to register a wdsl file. i got it and create manually a .cs class to implement it, but without registering the connected service i'am not able to setup url anche change it for different environment

gt.guybrush
  • 1,320
  • 3
  • 19
  • 48
  • 1
    `DotnetToolReference` is deprecated already and superseded by `dotnet tool` – Pavel Anikhouski Feb 24 '21 at 11:43
  • if i open nuget ui, search for svcutil and install in my project i get that error, don't se how can i use dotnet tool instead of DotnetToolReference: i only make a couple of click on nuget buttons – gt.guybrush Feb 24 '21 at 19:54

1 Answers1

4

This package is a tool for dotnet cli rather than for a project. You should install it into dotnet cli.

Check your environment and you have the enough right to control the PC.

Run cmd as Administrator and then type:

dotnet tool install --global dotnet-svcutil --version 2.0.2

enter image description here

Or you should follow this guidance to add your corporate proxy into global nuget.config file.

Mr Qian
  • 21,064
  • 1
  • 31
  • 41
  • i don't have admin rights and neither proxy url... IT said me that i have to tell vs to use system proxy without manually setting it – gt.guybrush Feb 25 '21 at 08:53
  • That sounds bad. To solve the issue, you have to contact your Administrator and give you enough permission to do this. And this is the best way to realize it. – Mr Qian Feb 26 '21 at 03:31
  • long job but now is done. svutil correctly installed but now when i try to add connected service i still have the error: Version for package `dotnet-svcutil-lib` could not be resolved. i found that post https://stackoverflow.com/questions/50972501/visual-studio-15-8-0-preview-2-0-mvc-core-2-1-adding-soap-as-connected-ser. but net core 2.0 or 2.1 or others makes no differences – gt.guybrush Feb 26 '21 at 09:51