win-universal-app – 构建错误的UWP应用程序Microsoft.Bcl.Build和packages.config旁边的项目文件

前端之家收集整理的这篇文章主要介绍了win-universal-app – 构建错误的UWP应用程序Microsoft.Bcl.Build和packages.config旁边的项目文件前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
构建 Windows通用应用程序时,我遇到了一个奇怪的构建错误.

Severity Code Description Project File Line Suppression State
Error Could not locate
C:\Users\me\Source\Repos\TT\Windows\MyCommonLibrary\packages.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

原文链接:https://www.f2er.com/windows/364061.html

猜你在找的Windows相关文章