This PR improves the error experience for non project.json based projects. Primarily improves the error message for missing RID from -
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Microsoft\NuGet\15.0\Microsoft.NuGet.targets(186,5): 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.
to -
C:\Program Files (x86)\Microsoft Visual Studio\2017Stable\Enterprise\MSBuild\Microsoft\NuGet\15.0\Microsoft.NuGet.targets(186,5): error : Your project csproj file doesn't list 'win' as a targeted runtime. You should add 'win' to the "RuntimeIdentifiers" property in your project csproj file and the n re-run NuGet restore. [E:\NuGet.BuildTasks\src\Microsoft.NuGet.Build.Tasks.Tests\Microsoft.NuGet.Build.Tasks.Tests.csproj]
Plus addimng tests for non project.json based scenarios.
Fixes: https://github.com/NuGet/Home/issues/6959
This PR improves the error experience for non project.json based projects. Primarily improves the error message for missing RID from -
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Microsoft\NuGet\15.0\Microsoft.NuGet.targets(186,5): 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.
to -
C:\Program Files (x86)\Microsoft Visual Studio\2017Stable\Enterprise\MSBuild\Microsoft\NuGet\15.0\Microsoft.NuGet.targets(186,5): error : Your project csproj file doesn't list 'win' as a targeted runtime. You should add 'win' to the "RuntimeIdentifiers" property in your project csproj file and the n re-run NuGet restore. [E:\NuGet.BuildTasks\src\Microsoft.NuGet.Build.Tasks.Tests\Microsoft.NuGet.Build.Tasks.Tests.csproj]
Plus addimng tests for non project.json based scenarios.