I found the problem. I have a project reference in the project file that points to an old project file for 2013:
<ProjectReference Include="..
When I use a reference to the correct project file, everything works find.
Thanks for the help!
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
After a new installation of Visual Studio 2019 on a blank machine, I had retarget my project and also set the correct SDK version.
But when I try to compile the project, I still get the MSB8020 error.
MSB8020 The build tools for Visual Studio 2013 (Platform Toolset = 'v120') cannot be found. To build using the v120 build tools, please install Visual Studio 2013 build tools. Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting "Retarget solution".
All the solutions I have found say I should use the 2013 toolset or retarget my project to the new 2019 toolset. I don't want to use the old build toolset, but retargeting the project doesn't work for me either. I don't understand where in the project file the compiler gets the v120 toolset. I double checked that the toolset is set correctly to <PlatformToolset>v142</PlatformToolset>
.
Does someone has a hint for me?
I found the problem. I have a project reference in the project file that points to an old project file for 2013:
<ProjectReference Include="..
When I use a reference to the correct project file, everything works find.
Thanks for the help!
Thanks for your reply! Yes, there are multiple projects in the solution. All the projects are retarget. All projects, except one, run into the same error. Just to be sure I created a new solution (.sln) with only one project and the error still remains.