wcf - 将连接的 Web 服务 WCF 引用添加到 .Net Core API 时出错
问题描述
Importing web service metadata ...
Number of service endpoints found: 2
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\2.1.503\Sdks\Microsoft.NET.Sdk\targets\GenerateDeps\GenerateDeps.proj
Done.
解决方案
.NET Standard 2.0
最近在带有类库的 Visual Studio 2019 (16.8.4) 中遇到了同样的问题。我能够svcutil.exe
从命令行使用现有的 Web 服务 (asmx) 生成代码。但是使用 Visual Studio ( Microsoft WCF Web Service Reference Provider
) 我得到了这个错误。
对我来说有趣的是,以管理员身份运行 Visual Studio 为我解决了问题(老实说,我没想到会这样)。
推荐阅读
- gradle - Gradle 构建冻结在地址注册表日志上
- python - 将列表转换为数组时 round() 的问题
- multiprocessing - MPI_IO write_all 子数组和组件号
- java - 在将 java 对象转换为 yaml 文件时,它还添加了对象名称
- c# - C# Winforms 软件部署 (setup.exe) 后数据库连接会发生什么?
- javascript - 无法使用 laravel 查看 MAC OS 中的时隙
- javascript - 在 react-router 中从类组件路由到功能组件时更新 document.location.pathname
- reactjs - 浏览器中是否可以访问环境变量?
- excel - 在可搜索的下拉列表中输入无效关键字时提示错误消息
- sql - 如何使用 SQL 查询按总和分组