Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build/Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<PackageVersion Include="Cake.Compression" Version="0.4.0" />
<PackageVersion Include="Cake.Codecov" Version="6.0.0" />
<PackageVersion Include="Cake.Coverlet" Version="6.0.1" />
<PackageVersion Include="Cake.Frosting" Version="6.0.0" />
<PackageVersion Include="Cake.Frosting" Version="6.1.0" />
<PackageVersion Include="Cake.Frosting.Git" Version="5.0.1" />
<PackageVersion Include="Cake.Http" Version="5.1.0" />
<PackageVersion Include="Cake.Incubator" Version="10.0.0" />
Expand Down
33 changes: 18 additions & 15 deletions build/artifacts/Tasks/ArtifactsMsBuildFullTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand All @@ -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);
}
Comment on lines +67 to +70
}
}
}
Loading