加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Windows > 正文

win-universal-app – 构建错误的UWP应用程序Microsoft.Bcl.Buil

发布时间:2020-12-14 04:33:09 所属栏目:Windows 来源:网络整理
导读:构建 Windows通用应用程序时,我遇到了一个奇怪的构建错误. Severity Code Description Project File Line Suppression State Error Could not locate C:UsersmeSourceReposTTWindowsMyCommonLibrarypackages.config. Ensure that this project has M
构建 Windows通用应用程序时,我遇到了一个奇怪的构建错误.

Severity Code Description Project File Line Suppression State
Error Could not locate
C:UsersmeSourceReposTTWindowsMyCommonLibrarypackages.config.
Ensure that this project has Microsoft.Bcl.Build installed and
packages.config is located next to the project
file. MyApp

‘MyApp’有一个项目参考’MyCommonLibrary’.

什么是奇怪的是,即使它被显示为一个构建’错误’.这不影响我构建“MyApp”或“MyCommonLibrary”的能力!

它也不会阻止我在本地或其他方面部署和运行我的应用程序.看到这个列表是一个构建错误,当它不会打破构建时,这只是一个烦人的事情!

我跟随了Bcl.Build包的所有者,并得到了Eric St. John的回应.他说你不应该在使用project.json的UWP项目中引用Bcl.Build,并且有一个项目属性来抑制告诉你这样做的警告.

Correct,the problem is most of the packages out there that use it also don’t know about UWP either and if they update for UWP we want them to drop this dependency rather than make it work. The package isn’t needed at all for UWP or any framework that supports project.json.

To work around the error with the old package do the following:

Add <SkipValidatePackageReferences>true</SkipValidatePackageReferences> to the at the top of your csproj/vbproj

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读