架构师_程序员_码农网

 找回密码
 注册[Register]

QQ登录

只需一步,快速开始

查看: 8459|回复: 1

[WCF/Web Servics] WCF:Error:Unable to generate deps.json

[复制链接]
发表于 2020-7-2 09:52:57 | 显示全部楼层 |阅读模式
在使用 asp.net core 引用 WCF 服务的时候,报错如下:
Importing web service metadata ...
Number of service endpoints found: 1
Scaffolding service reference code ...
Error:Unable to generate deps.json, it may have been already generated.  You can specify the "-d" option before the tool name for diagnostic output (for example, "dotnet -d <toolname>": C:\Program Files\dotnet\sdk\3.1.300\Sdks\Microsoft.NET.Sdk\targets\GenerateDeps\GenerateDeps.proj
Done.

wcf error.png

尝试执行如下命令:

报错如下:

Telemetry is: Enabled
projectfactory: MSBUILD_EXE_PATH = C:\Program Files\dotnet\sdk\3.1.300\MSBuild.dll
projectfactory: MSBuild project path =
projecttoolscommandresolver: ProjectFactory did not find Project.
Microsoft.DotNet.Cli.Utils.CommandUnknownException: Could not execute because the specified command or file was not found.
Possible reasons for this include:                                                                                        * You misspelled a built-in dotnet command.
  * You intended to execute a .NET Core program, but dotnet-svcutil does not exist.
  * You intended to run a global tool, but a dotnet-prefixed executable with this name could not be found on the PATH.
   at Microsoft.DotNet.CommandFactory.CommandFactoryUsingResolver.Create(ICommandResolverPolicy commandResolverPolicy, String commandName, IEnumerable`1 args, NuGetFramework framework, String configuration, String outputPath, String applicationName)                                                                                                                  at Microsoft.DotNet.Cli.Program.ProcessArgs(String[] args, ITelemetry telemetryClient)                                  at Microsoft.DotNet.Cli.Program.Main(String[] args)
svcutil.png

解决方案

使用 dotnet-cli 命令全局安装 svcutil 工具,命令如下:



重新引用WCF Service即可。

https://github.com/dotnet/wcf/bl ... -Reference-notes.md




上一篇:Nuget 设置 HTTP 代理访问
下一篇:CentOS 系统硬件要求的配置
码农网,只发表在实践过程中,遇到的技术难题,不误导他人。
发表于 2022-12-2 01:22:28 | 显示全部楼层
向大神学习
码农网,只发表在实践过程中,遇到的技术难题,不误导他人。
您需要登录后才可以回帖 登录 | 注册[Register]

本版积分规则

免责声明:
码农网所发布的一切软件、编程资料或者文章仅限用于学习和研究目的;不得将上述内容用于商业或者非法用途,否则,一切后果请用户自负。本站信息来自网络,版权争议与本站无关。您必须在下载后的24个小时之内,从您的电脑中彻底删除上述内容。如果您喜欢该程序,请支持正版软件,购买注册,得到更好的正版服务。如有侵权请邮件与我们联系处理。

Mail To:help@itsvse.com

QQ|手机版|小黑屋|架构师 ( 鲁ICP备14021824号-2 )|网站地图

GMT+8, 2024-4-24 17:56

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表