wcf: cannot install dotnet-svcutil

Describe the bug I am attempting to consume a WCF service in my asp.net core web application.

When I attempt to add a Connected Service, I receive these errors:

Importing web service metadata … Number of service endpoints found: 2 Scaffolding service reference code … Error:Could not execute because the specified command or file was not found. Error:Possible reasons for this include: Error: * You misspelled a built-in dotnet command. Error: * You intended to execute a .NET Core program, but dotnet-svcutil-lib does not exist. Error: * You intended to run a global tool, but a dotnet-prefixed executable with this name could not be found on the PATH. Done.

Thus, I am attempting to update the asp.net core web application client as suggested here: https://docs.microsoft.com/en-us/dotnet/core/additional-tools/dotnet-svcutil-guide?tabs=dotnetsvcutil2x

When I attempt to install the above as suggested I receive the following errors (see https://www.nuget.org/packages/dotnet-svcutil):

PM> dotnet tool install --global dotnet-svcutil --version 2.0.1
dotnet : Failed to install tool package 'dotnet-svcutil': Could not find a part of the path 'C:\Users\rmoore\.dotnet\tools\.store\.stage\c5nihhp2.0fj\dotnet-svcutil'.
At line:1 char:1
+ dotnet tool install --global dotnet-svcutil --version 2.0.1
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (Failed to insta...otnet-svcutil'.:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError
 
Tool 'dotnet-svcutil' failed to install. This failure may have been caused by:

* You are attem
pting to install a preview release and did not use the --version option to specify the version.
* A package by this name was found, but it was not a .NET Core tool.
* The required NuGet feed cannot be accessed, perhaps because of an Internet connection problem.
* You mistyped the name of the tool.

When I attempt to install dotnet-svcutil using “Extensions and Updates” in Visual Studio, I get these errors:

Severity Code Description Project File Line Suppression State Error NU1212 Invalid project-package combination for dotnet-svcutil 2.0.1. DotnetToolReference project style can only contain references of the DotnetTool type MyCorp.CRM.Web C:\Projects\MyApp\MyCorp.CRM.Web\MyCorp.CRM.Web.csproj 1 Error Package ‘dotnet-svcutil 2.0.1’ has a package type ‘DotnetTool’ that is not supported by project ‘MyCorp.CRM.Web’. Error NU1202 Package dotnet-svcutil 2.0.1 is not compatible with netcoreapp2.2 (.NETCoreApp,Version=v2.2). Package dotnet-svcutil 2.0.1 supports: netcoreapp2.1 (.NETCoreApp,Version=v2.1) / any MyCorp.CRM.Web C:\Projects\MyApp\MyCorp.CRM.Web\MyCorp.CRM.Web.csproj

Expected behavior My ultimate goal is to have a service reference in my asp.net core web application.

This is my Visual Studio info:

Microsoft Visual Studio Professional 2019 Version 16.1.6 VisualStudio.16.Release/16.1.6+29102.190 Microsoft .NET Framework Version 4.7.03190

Installed Version: Professional

Visual C++ 2019 00435-60000-00000-AA876 Microsoft Visual C++ 2019

ADL Tools Service Provider 1.0 This package contains services used by Data Lake tools

Application Insights Tools for Visual Studio Package 9.1.00429.1 Application Insights Tools for Visual Studio

ASP.NET and Web Tools 2019 16.1.429.50124 ASP.NET and Web Tools 2019

ASP.NET Web Frameworks and Tools 2012 16.1.429.50124 For additional information, visit https://www.asp.net/

ASP.NET Web Frameworks and Tools 2019 16.1.429.50124 For additional information, visit https://www.asp.net/

Azure App Service Tools v3.0.0 16.1.429.50124 Azure App Service Tools v3.0.0

Azure Data Lake Node 1.0 This package contains the Data Lake integration nodes for Server Explorer.

Azure Data Lake Tools for Visual Studio 2.3.9000.0 Microsoft Azure Data Lake Tools for Visual Studio

Azure Functions and Web Jobs Tools 16.1.429.50124 Azure Functions and Web Jobs Tools

Azure Stream Analytics Tools for Visual Studio 2.3.9000.0 Microsoft Azure Stream Analytics Tools for Visual Studio

C# Tools 3.1.1-beta4-19281-06+58a4b1e79aea28115e66b06f850c83a3f1fcb6d3 C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

CodeMaid 11.0.183 CodeMaid is an open source Visual Studio extension to cleanup and simplify our C#, C++, F#, VB, PHP, PowerShell, R, JSON, XAML, XML, ASP, HTML, CSS, LESS, SCSS, JavaScript and TypeScript coding.

Common Azure Tools 1.10 Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

Cookiecutter 16.1.19129.1 Provides tools for finding, instantiating and customizing templates in cookiecutter format.

Devart Code Compare 5.1.156 Devart Code Compare Copyright © 2012-2019 Devart. All rights reserved. http://www.devart.com/codecompare/

Dotfuscator Community Edition 5.42.0.9514-e0e25f754 PreEmptive Protection - Dotfuscator CE

Extensibility Message Bus 1.1.77 (master@24013d5) Provides common messaging-based MEF services for loosely coupled Visual Studio extension components communication and integration.

EZ-GIT 1.9.0

Fabric.DiagnosticEvents 1.0 Fabric Diagnostic Events

GitHub.VisualStudio 2.9.1.7781 A Visual Studio Extension that brings the GitHub Flow into Visual Studio.

IntelliCode Extension 1.0 IntelliCode Visual Studio Extension Detailed Info

JetBrains ReSharper Ultimate 2019.1.3 Build 191.0.20190704.212735 JetBrains ReSharper Ultimate package for Microsoft Visual Studio. For more information about ReSharper Ultimate, visit http://www.jetbrains.com/resharper. Copyright © 2019 JetBrains, Inc.

Microsoft Azure HDInsight Azure Node 2.3.9000.0 HDInsight Node under Azure Node

Microsoft Azure Hive Query Language Service 2.3.9000.0 Language service for Hive query

Microsoft Azure Service Fabric Tools for Visual Studio 2.5 Microsoft Azure Service Fabric Tools for Visual Studio

Microsoft Azure Stream Analytics Language Service 2.3.9000.0 Language service for Azure Stream Analytics

Microsoft Azure Stream Analytics Node 1.0 Azure Stream Analytics Node under Azure Node

Microsoft Azure Tools 2.9 Microsoft Azure Tools for Microsoft Visual Studio 0x10 - v2.9.20419.2

Microsoft Continuous Delivery Tools for Visual Studio 0.4 Simplifying the configuration of Azure DevOps pipelines from within the Visual Studio IDE.

Microsoft JVM Debugger 1.0 Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines

Microsoft Library Manager 1.0 Install client-side libraries easily to any web project

Microsoft MI-Based Debugger 1.0 Provides support for connecting Visual Studio to MI compatible debuggers

Microsoft Visual C++ Wizards 1.0 Microsoft Visual C++ Wizards

Microsoft Visual Studio Tools for Containers 1.1 Develop, run, validate your ASP.NET Core applications in the target environment. F5 your application directly into a container with debugging, or CTRL + F5 to edit & refresh your app without having to rebuild the container.

Microsoft Visual Studio VC Package 1.0 Microsoft Visual Studio VC Package

Mono Debugging for Visual Studio 16.1.1 (2473f22) Support for debugging Mono processes with Visual Studio.

Node.js Tools 1.5.10424.1 Commit Hash:c3ce0ae0b29c0b3a755ffc12f8a685fe7ddd3600 Adds support for developing and debugging Node.js apps in Visual Studio

NuGet Package Manager 5.1.0 NuGet Package Manager in Visual Studio. For more information about NuGet, visit https://docs.nuget.org/

Office Developer Tools for Visual Studio 16.0.28818.01 Microsoft Office Developer Tools for Visual Studio

Open Command Line 2.1.218 Opens a command line at the root of the project. Support for all consoles such as CMD, PowerShell, Bash etc. Provides syntax highlighting, Intellisense and execution of .cmd and .bat files.

PeachPie Visual Studio Extension 0.9.45 PeachPie is the PHP language compiler for .NET & .NET Core. It allows for building, integrating, running and debugging of legacy PHP code bases to .NET platform. PeachPie outputs regular .NET assemblies not relying on the native PHP runtime.

This extension provides project templates and other development tools for the PeachPie platform.

Productivity Power Tools 2017/2019 16.0 Installs the individual extensions of Productivity Power Tools 2017/2019

ProjectServicesPackage Extension 1.0 ProjectServicesPackage Visual Studio Extension Detailed Info

Python 16.1.19129.1 Provides IntelliSense, projects, templates, debugging, interactive windows, and other support for Python developers.

Python - Conda support 16.1.19129.1 Conda support for Python projects.

Python - Django support 16.1.19129.1 Provides templates and integration for the Django web framework.

Python - IronPython support 16.1.19129.1 Provides templates and integration for IronPython-based projects.

Python - Profiling support 16.1.19129.1 Profiling support for Python projects.

ResourcePackage Extension 1.0 ResourcePackage Visual Studio Extension Detailed Info

ResourcePackage Extension 1.0 ResourcePackage Visual Studio Extension Detailed Info

SQL Server Data Tools 16.0.61904.23160 Microsoft SQL Server Data Tools

Test Adapter for Boost.Test 1.0 Enables Visual Studio’s testing tools with unit tests written for Boost.Test. The use terms and Third Party Notices are available in the extension installation directory.

Test Adapter for Google Test 1.0 Enables Visual Studio’s testing tools with unit tests written for Google Test. The use terms and Third Party Notices are available in the extension installation directory.

ToolWindowHostedEditor 1.0 Hosting json editor into a tool window

TypeScript Tools 16.0.10506.2004 TypeScript Tools for Microsoft Visual Studio

Visual Basic Tools 3.1.1-beta4-19281-06+58a4b1e79aea28115e66b06f850c83a3f1fcb6d3 Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Visual C++ for Cross Platform Mobile Development (Android) 15.0.28917.181 Visual C++ for Cross Platform Mobile Development (Android)

Visual C++ for Cross Platform Mobile Development (iOS) 15.0.28810.153 Visual C++ for Cross Platform Mobile Development (iOS)

Visual C++ for Linux Development 1.0.9.28917 Visual C++ for Linux Development

Visual F# Tools 10.4 for F# 4.6 16.1.0-beta.19253.3+42526fe359672a05fd562dc16a91a43d0fe047a7 Microsoft Visual F# Tools 10.4 for F# 4.6

Visual Studio Code Debug Adapter Host Package 1.0 Interop layer for hosting Visual Studio Code debug adapters in Visual Studio

Visual Studio Tools for CMake 1.0 Visual Studio Tools for CMake

Visual Studio Tools for CMake 1.0 Visual Studio Tools for CMake

Visual Studio Tools for Containers 1.0 Visual Studio Tools for Containers

Visual Studio Tools for Kubernetes 1.0 Visual Studio Tools for Kubernetes

Visual Studio Tools for Unity 4.1.1.0 Visual Studio Tools for Unity

VisualStudio.Mac 1.0 Mac Extension for Visual Studio

Workflow Manager Tools 1.0 1.0 This package contains the necessary Visual Studio integration components for Workflow Manager.

Xamarin 16.1.0.545 (d16-1@db7c858e8) Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin Designer 16.1.0.418 (remotes/origin/d16-1@5b958bb10) Visual Studio extension to enable Xamarin Designer tools in Visual Studio.

Xamarin Templates 16.2.112 (4db4af4) Templates for building iOS, Android, and Windows apps with Xamarin and Xamarin.Forms.

Xamarin.Android SDK 9.3.0.23 (HEAD/d0b48056f) Xamarin.Android Reference Assemblies and MSBuild support. Mono: mono/mono/2018-08@3a07bd426d3 Java.Interop: xamarin/java.interop/d16-1@5ddc3e3 LibZipSharp: grendello/LibZipSharp/d16-1@44de300 LibZip: nih-at/libzip/rel-1-5-1@b95cf3f ProGuard: xamarin/proguard/master@905836d SQLite: xamarin/sqlite/3.27.1@8212a2d Xamarin.Android Tools: xamarin/xamarin-android-tools/d16-1@acabd26

Xamarin.iOS and Xamarin.Mac SDK 12.10.0.157 (6bd9475) Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 2
  • Comments: 16 (6 by maintainers)

Most upvoted comments

I solved my problem: The problem was a corporate proxy server. After I configured the proxy server in my nuget.config like suggested in this SO-answer it worked perfectly.

@webasoo You want to run the tool in the same folder that your csproj is in. That will let the ServiceReference folder be generated where the project will find it, and will let the tool add the WCF packages to your project for you. Since you ran it in a different folder and without passing the --projectFile argument you’ll need to add references to the WCF packages manually.