且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

项目文件旁边的 UWP 应用 Microsoft.Bcl.Build 和 packages.config 的构建错误

更新时间:2023-01-30 13:27:59

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

I followed up with the Bcl.Build package owners and got a response from Eric St. John. He says that you shouldn't reference Bcl.Build in your UWP project that uses project.json, and there's a project property to suppress the warning that is telling you to do so.

正确,问题是大多数使用它的包也不知道 UWP,如果它们针对 UWP 进行更新,我们希望它们删除此依赖项而不是使其工作.UWP 或任何支持 project.json 的框架根本不需要该包.

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:

添加 <SkipValidatePackageReferences>true</SkipValidatePackageReferences>到你的 csproj/vbproj 的顶部

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