MSBuild fails for .NET Core SDK Version 2.2.202

前端 未结 5 824
旧巷少年郎
旧巷少年郎 2021-01-22 19:59

After downloading and installing Visual Studio 2019 RC, I cannot run msbuild, and get the following error:

\"Version 2.2.202 of the .NET Core SDK requires a

5条回答
  •  盖世英雄少女心
    2021-01-22 20:10

    For anyone that is still coming across this issue. I found another way, to get around this without upgrading to VS 2019 or rolling back SDK 3.1. My experience is in TFS 2017 (on-prem). I'm the build engineer, not a developer.
    I had an SDK 2.2 app that was failing after the install of 3.1.
    Initially, it was causing the NuGet steps to fail. Research led to me asking the developers to add a global.json file having it point to 2.2. This fixed the NuGet errors. Then MSBuild step was failing with similar to OPs message. Couldn't figure out why 3.1 was taking presedence over 2.2 when it was listed in global.json. So I started digging around in the SDK in stall folders (typically located in C:\Program Files\dotnet\sdk). I came across a file named minimumMSBuildVersion In the SDK\3.1.101 folder that file has version 16.3.0 of MSBuild listed. I then went to the SDK 2.2 folder and checked it there. It has version 15.3.0 which my build server has. I simply changed the version to this in the 3.1 folder and my build succeeded. I hope this helps anyone that may still be experiencing build issues when .Net Core SDK versions are updated on their TFS Build Servers.

提交回复
热议问题