无法使用 VIsual Studio 2019 安装 dotnet-svcutil 以注册 wsdl 服务 [英] Cannot install dotnet-svcutil with VIsual Studio 2019 to register wsdl services

查看:89
本文介绍了无法使用 VIsual Studio 2019 安装 dotnet-svcutil 以注册 wsdl 服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遵循了很多方法,这里主要有两种:

I followed many ways, here the main two:

通过 Nuget 安装:我创建了一个专用的 .Net Core 2.1 控制台应用程序.通过 nuget ui 添加 svutil 2.0.2 我得到:

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 

安装为全局工具我跑

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

dotnet tool install --global dotnet-svcutil

但出现错误,可能的原因是公司代理身份验证,我无法设置代理 url

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

最终目标是注册一个 wdsl 文件.我得到了它并手动创建了一个 .cs 类来实现它,但是如果没有注册连接的服务,我就无法为不同的环境设置 url anche 更改它

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

推荐答案

此包是用于 dotnet cli 而非项目的工具.您应该将其安装到 dotnet cli 中.

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

检查您的环境,您有足够的权利控制 PC.

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

管理员身份运行cmd,然后输入:

Run cmd as Administrator and then type:

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

或者您应该遵循本指南将您的公司代理添加到全局 nuget.config 文件中.

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

这篇关于无法使用 VIsual Studio 2019 安装 dotnet-svcutil 以注册 wsdl 服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆