Visual Studio 15.8.0 Preview 2.0 - MVC - Core 2.1 - 添加 SOAP 作为连接服务 - 无法解析包 dotnet-svcutil 的版本 [英] Visual Studio 15.8.0 Preview 2.0 - MVC - Core 2.1 - Adding SOAP as Connected Service - Version for package dotnet-svcutil could not be resolved

查看:16
本文介绍了Visual Studio 15.8.0 Preview 2.0 - MVC - Core 2.1 - 添加 SOAP 作为连接服务 - 无法解析包 dotnet-svcutil 的版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用以下内容:Visual Studio 15.8.0 Preview 2.0,ASP.NET Web 应用程序,目标为 .NET Core 2.1.我正在尝试将 SOAP 服务添加为 Connected服务.(我在 VS 15.7.4 中遇到了同样的问题,所以我认为去预览版可能会发现此问题已修复)

I am working with the following: Visual Studio 15.8.0 Preview 2.0, ASP.NET Web Application, with Target of .NET Core 2.1. I am trying to add a SOAP service as a Connected Service. (I had the same problem with VS 15.7.4, so I thought going to the preview version might find this issue fixed)

我选择了 Microsoft WCF Web 服务参考提供程序.

当我尝试添加 SOAP 服务时,我得到:

When I try to add the SOAP service, I get:

dotnet-svcutil的版本无法解析

Version for package dotnet-svcutil could not be resolved

...

我选择了以下路线但没有成功(mlacouture - 提到更改目录 svcutil_starter 中的 nuget.config 以修复 svcutil 包的位置,然后在 Nuget 包上执行 dotnet restore.与这个VS预览版,nuget.config中svcutil的位置已经正确(C:PROGRAM FILES (X86)MICROSOFT VISUAL STUDIO2017ENTERPRISECOMMON7IDEEXTENSIONSMICROSOFTWCF CONNECTED SERVICEsvcutildotnet-svcutil.1.0.0-preview-20406-879.nupkg).

I went the following route without success (mlacouture - mentioned changing nuget.config in directory svcutil_starter to fix the location of the svcutil package, then doing dotnet restore on the Nuget package. With this preview version of VS, the location of svcutil in nuget.config is already correct (C:PROGRAM FILES (X86)MICROSOFT VISUAL STUDIO2017ENTERPRISECOMMON7IDEEXTENSIONSMICROSOFTWCF CONNECTED SERVICEsvcutildotnet-svcutil.1.0.0-preview-20406-879.nupkg).

我仍然得到:C:Program Filesdotnetsdk2.1.300NuGet.targets(114,5): 错误:本地源 'C:Usersmedwa163AppDataLocalTempWCFConnectedService2018_Jun_22_08_01_15svcutil_starterdotnet-svcutil.1.0.0-preview-20406-879.nupkg' 不存在. [C:Usersmedwa163AppDataLocalTempWCF1020102102J_Service2018_Jun_22_08_01_Servicesvcutil_startersvcutil_starter.csproj].它确实存在.

I continue to still get: C:Program Filesdotnetsdk2.1.300NuGet.targets(114,5): error : The local source 'C:Usersmedwa163AppDataLocalTempWCFConnectedService2018_Jun_22_08_01_15svcutil_starterdotnet-svcutil.1.0.0-preview-20406-879.nupkg' doesn't exist. [C:Usersmedwa163AppDataLocalTempWCFConnectedService2018_Jun_22_08_01_15svcutil_startersvcutil_starter.csproj]. It definitely does exist.

如果我将包复制到 Nuget.config 中的同一目录,并将 Nuget.config 更改为指向它,则会出现相同的错误.清除了 nuget 缓存和相同的错误.

If I copy the package to the same directory at the Nuget.config, and change Nuget.config to point to it, I get the same error. Cleared the nuget cache and same error.

有关潜在解决方法的 GitHub 信息

...

对此的任何见解将不胜感激.

Any insight into this would be greatly appreciated.

推荐答案

我终于找到了解决方案.

我暂时将项目的目标从 .NET Core 2.1 更改为 .NET Core 2.0.然后我就可以添加服务了.

I temporarily changed the target of the project from .NET Core 2.1 to .NET Core 2.0. Then I was able to add the service.

之后,我将目标改回 .NET Core 2.1 并进行了测试.我能够成功调用该服务.

After that, I changed the target back to .NET Core 2.1 and tested. I was able to call the service successfully.

这篇关于Visual Studio 15.8.0 Preview 2.0 - MVC - Core 2.1 - 添加 SOAP 作为连接服务 - 无法解析包 dotnet-svcutil 的版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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