diff --git a/build/Directory.Packages.props b/build/Directory.Packages.props
index 8cf5e174c4..a0fa0dcb3b 100644
--- a/build/Directory.Packages.props
+++ b/build/Directory.Packages.props
@@ -6,7 +6,7 @@
-
+
diff --git a/build/artifacts/Tasks/ArtifactsMsBuildFullTest.cs b/build/artifacts/Tasks/ArtifactsMsBuildFullTest.cs
index 6551b6475b..d8cc15342f 100644
--- a/build/artifacts/Tasks/ArtifactsMsBuildFullTest.cs
+++ b/build/artifacts/Tasks/ArtifactsMsBuildFullTest.cs
@@ -23,9 +23,6 @@ public override void Run(BuildContext context)
var nugetSource = context.MakeAbsolute(Paths.Nuget).FullPath;
- const int toolVersionValue = 11; // Workaround for now. It should be removed when https://github.com/cake-build/cake/issues/4658 is merged
- var isMsBuildToolVersionValid = Enum.IsDefined(typeof(MSBuildToolVersion), toolVersionValue);
-
context.Information("\nTesting msbuild task with dotnet build\n");
foreach (var netVersion in Constants.DotnetVersions)
{
@@ -46,25 +43,31 @@ public override void Run(BuildContext context)
var exe = Paths.Integration.Combine("build").Combine(framework).CombineWithFilePath("app.dll");
context.ValidateOutput("dotnet", exe.FullPath, fullSemVer);
- if (!isMsBuildToolVersionValid) continue;
+ if (!Enum.IsDefined(MSBuildToolVersion.VS2026)) continue;
- const MSBuildToolVersion toolVersion = (MSBuildToolVersion)toolVersionValue;
context.Information("\nTesting msbuild task with msbuild (for full framework)\n");
- var msBuildSettings = new MSBuildSettings
+ try
{
- Verbosity = Verbosity.Minimal,
- ToolVersion = toolVersion,
- Restore = true
- };
+ var msBuildSettings = new MSBuildSettings
+ {
+ Verbosity = Verbosity.Minimal,
+ ToolVersion = MSBuildToolVersion.VS2026,
+ Restore = true
+ };
- msBuildSettings.WithProperty("GitVersionMsBuildVersion", version);
- msBuildSettings.WithProperty("RestoreSource", nugetSource);
+ msBuildSettings.WithProperty("GitVersionMsBuildVersion", version);
+ msBuildSettings.WithProperty("RestoreSource", nugetSource);
- context.MSBuild(projPath.FullPath, msBuildSettings);
+ context.MSBuild(projPath.FullPath, msBuildSettings);
- var fullExe = Paths.Integration.Combine("build").CombineWithFilePath("app.exe");
- context.ValidateOutput(fullExe.FullPath, null, fullSemVer);
+ var fullExe = Paths.Integration.Combine("build").CombineWithFilePath("app.exe");
+ context.ValidateOutput(fullExe.FullPath, null, fullSemVer);
+ }
+ catch (Exception e)
+ {
+ context.Error(e.Message);
+ }
}
}
}