1
votes

I have an issue with MSBuild which give this message:

C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\Microsoft\NuGet\15.0\Microsoft.NuGet.targets(178,5): error : Your project.json doesn't have a runtimes section. You should add '"runtimes": { "win10-x86-aot": { } }' to your project.json and then re-run NuGet restore.

I found several issues as the mine on StackOverflow and the solution seems to be to delete the obj folder but it was not the same context.

I installed only MSBuild for Visual Studio 2017 (so, without Visual Studio) for using it with Jenkins. My Jenkins master is installed on a Mac OS, and MSBuild is installed on a Windows 10 PC which is used only to do this job. If I use my development machine (Windows 10 laptop with Visual Studio 2017) as Jenkins remote agent and I launch the build from Jenkins portal, it works well, but if I use the other PC with MSBuild, I have this issue.

1

1 Answers

1
votes

Okay, so I solved my issue adding a section in my CSPROJ, according to the MSDN documentation here