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

相关文章

Windows2012R2备用域控搭建 前置操作 域控主域控的主dns:自...
主域控角色迁移和夺取(转载) 转载自:http://yupeizhi.blo...
Windows2012R2 NTP时间同步 Windows2012R2里没有了internet时...
Windows注册表操作基础代码 Windows下对注册表进行操作使用的...
黑客常用WinAPI函数整理之前的博客写了很多关于Windows编程的...
一个简单的Windows Socket可复用框架说起网络编程,无非是建...