project.json doesn't have a runtimes section, add '“runtimes”: { “win”: { } }' to project.json within a .Net Class Library
Recently I've started experiencing weird build errors when switch branches on a product. Error : Your project.json doesn't have a runtimes section. You should add '"runtimes": { "win": { } }' to your project.json and then re-run NuGet restore. It's a weird sounding error and the fact it mentions project.json makes it sound like a hangup from when .Net Core and Standard were using project.json files before they became .csproj files again. My first thought to resolve this is always try a clean and build, particularity when swapping branches things could get left hanging around but this doesn't work. I took a closer look at the projects affected and the cause is to do with one of the branches of our product. It's an early development branch of a new feature where the project has become .Net Standard 2.0 but also targets .Net 4.5, where as the support and main dev branch are still the full framework class libraries. The cause is mos...