Skip to content

Commit

Permalink
build: Fix build.cake after update
Browse files Browse the repository at this point in the history
After updating to cake 3.1.0, `WithProperty` does not seem to
make a clone of the `MSBuildSettings` object.

This breaks workload manifest generation.
  • Loading branch information
trungnt2910 committed Jul 21, 2023
1 parent 5ab9b5e commit 341dc46
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -187,10 +187,12 @@ Task("BuildAndPackageWorkload")
continue;
}

buildSettings.MSBuildSettings = buildSettings.MSBuildSettings.WithProperty("_HaikuManifestVersionBand", band);
buildSettings.MSBuildSettings.Properties.Remove("_HaikuManifestVersionBand");
buildSettings.MSBuildSettings.Properties.Add("_HaikuManifestVersionBand", new [] { band });
DotNetBuild("workload/Trungnt2910.NET.Sdk.Haiku/Trungnt2910.NET.Sdk.Haiku.csproj", buildSettings);

packSettings.MSBuildSettings = packSettings.MSBuildSettings.WithProperty("_HaikuManifestVersionBand", band);
packSettings.MSBuildSettings.Properties.Remove("_HaikuManifestVersionBand");
packSettings.MSBuildSettings.Properties.Add("_HaikuManifestVersionBand", new [] { band });
DotNetPack("workload/Trungnt2910.NET.Sdk.Haiku/Trungnt2910.NET.Sdk.Haiku.csproj", packSettings);
}
});
Expand Down

0 comments on commit 341dc46

Please sign in to comment.