I am getting a strange build error when building Windows Universal apps.
Severity Code Description Project File Line Suppression State Err
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.
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
I believe this is a false positive from the Nuget Update to 3.1.
For the time I solved it by creating the packages.config Visual Studio demands manually out of the existing project.json.
For instance:
project.json
{
"dependencies": {
"Microsoft.Bcl.Build": "1.0.21",
"Newtonsoft.Json": "8.0.2"
},
"frameworks": {
"uap10.0": {}
},
"runtimes": {
"win10-arm": {},
"win10-arm-aot": {},
"win10-x86": {},
"win10-x86-aot": {},
"win10-x64": {},
"win10-x64-aot": {}
}
}
packages.config
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.Bcl.Build" version="1.0.21" targetFramework="uap10.0" />
<package id="Newtonsoft.Json" version="8.0.2" targetFramework="uap10.0" />
</packages>