Skip to content

Commit

Permalink
(cake-buildGH-3598,cake-buildGH-3599) VS2022 MSBuild -preview +default
Browse files Browse the repository at this point in the history
* Remove Preview from VS2022 MSBuild Resolver, fixes cake-build#3598
* Add VS2022 to default MSBuild Resolver, fixes cake-build#3599
  • Loading branch information
devlead committed Oct 13, 2021
1 parent 90e857f commit 6cff548
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,8 @@ public void Should_Get_Correct_Path_To_MSBuild_Version_16(MSBuildToolVersion ver
}

[Theory]
[InlineData(MSBuildToolVersion.VS2022, PlatformTarget.x64, PlatformFamily.Windows, false, "/Program/Microsoft Visual Studio/2022/Preview/MSBuild/Current/Bin/amd64/MSBuild.exe")]
[InlineData(MSBuildToolVersion.VS2022, PlatformTarget.x86, PlatformFamily.Windows, false, "/Program/Microsoft Visual Studio/2022/Preview/MSBuild/Current/Bin/MSBuild.exe")]
[InlineData(MSBuildToolVersion.VS2022, PlatformTarget.x64, PlatformFamily.Windows, false, "/Program/Microsoft Visual Studio/2022/Enterprise/MSBuild/Current/Bin/amd64/MSBuild.exe")]
[InlineData(MSBuildToolVersion.VS2022, PlatformTarget.x86, PlatformFamily.Windows, false, "/Program/Microsoft Visual Studio/2022/Enterprise/MSBuild/Current/Bin/MSBuild.exe")]
[InlineData(MSBuildToolVersion.VS2022, PlatformTarget.x64, PlatformFamily.Linux, false, "/usr/bin/msbuild")]
[InlineData(MSBuildToolVersion.VS2022, PlatformTarget.x64, PlatformFamily.OSX, false, "/Library/Frameworks/Mono.framework/Versions/Current/Commands/msbuild")]
public void Should_Get_Correct_Path_To_MSBuild_Version_17(MSBuildToolVersion version, PlatformTarget target, PlatformFamily family, bool is64BitOperativeSystem, string expected)
Expand Down
5 changes: 2 additions & 3 deletions src/Cake.Common/Tools/MSBuild/MSBuildResolver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ private static DirectoryPath GetHighestAvailableMSBuildVersion(IFileSystem fileS
{
var versions = new[]
{
// MSBuildVersion.MSBuild17, /*Since it's still in preview, do not search unless specified. Uncomment after stable version released*/
MSBuildVersion.MSBuild17,
MSBuildVersion.MSBuild16,
MSBuildVersion.MSBuild15,
MSBuildVersion.MSBuild14,
Expand Down Expand Up @@ -212,8 +212,7 @@ private static DirectoryPath GetVisualStudio2022Path(IFileSystem fileSystem, ICa
"Enterprise",
"Professional",
"Community",
"BuildTools",
"Preview" // Remove after stable version released
"BuildTools"
};

var visualStudio2022Path = environment.GetSpecialPath(SpecialPath.ProgramFiles);
Expand Down

0 comments on commit 6cff548

Please sign in to comment.