无法使用 VIsual Studio 2019 安装 dotnet-svcutil 以注册 wsdl 服务
Cannot install dotnet-svcutil with VIsual Studio 2019 to register wsdl services
我遵循了很多方法,这里主要有两个:
通过 Nuget 安装:
我已经创建了一个专用的 .Net Core 2.1 控制台应用程序。
通过 nuget 添加 svutil 2.0.2 ui 我得到:
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
作为全局工具安装
我运行
dotnet tool install --global dotnet-svcutil --version 2.0.2
或
dotnet tool install --global dotnet-svcutil
但出现错误,可能的原因是公司代理身份验证,我无法使用代理 url 来设置它
最终目标是注册一个wdsl文件。我得到它并手动创建一个 .cs class 来实现它,但是没有注册连接的服务我无法设置 url anche 改变它以适应不同的环境
这个包是一个用于 dotnet cli 的工具,而不是一个项目。您应该将它安装到 dotnet cli 中。
检查你的环境,你有足够的权限控制PC。
运行 cmd as Administrator 然后输入:
dotnet tool install --global dotnet-svcutil --version 2.0.2
或您应该按照this guidance将您的公司代理添加到全局nuget.config
文件中。
我遵循了很多方法,这里主要有两个:
通过 Nuget 安装: 我已经创建了一个专用的 .Net Core 2.1 控制台应用程序。 通过 nuget 添加 svutil 2.0.2 ui 我得到:
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
作为全局工具安装 我运行
dotnet tool install --global dotnet-svcutil --version 2.0.2
或
dotnet tool install --global dotnet-svcutil
但出现错误,可能的原因是公司代理身份验证,我无法使用代理 url 来设置它
最终目标是注册一个wdsl文件。我得到它并手动创建一个 .cs class 来实现它,但是没有注册连接的服务我无法设置 url anche 改变它以适应不同的环境
这个包是一个用于 dotnet cli 的工具,而不是一个项目。您应该将它安装到 dotnet cli 中。
检查你的环境,你有足够的权限控制PC。
运行 cmd as Administrator 然后输入:
dotnet tool install --global dotnet-svcutil --version 2.0.2
或您应该按照this guidance将您的公司代理添加到全局nuget.config
文件中。