Skip to content

Commit 96cbf3b

Browse files
committed
React to change in CLI handling of /p:P1=V1;P2=V2
See https://github.com/dotnet/cli/issues/9369
1 parent 39fc3ec commit 96cbf3b

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToControlGeneratedAssemblyInfo.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -272,11 +272,11 @@ public void It_respects_version_prefix(string targetFramework)
272272
var testAsset = _testAssetsManager
273273
.CopyTestAsset("HelloWorld", identifier: targetFramework)
274274
.WithSource()
275-
.Restore(Log, "", $"/p:OutputType=Library;TargetFramework={targetFramework}");
275+
.Restore(Log, "", $"/p:OutputType=Library", $"/p:TargetFramework={targetFramework}");
276276

277277
var buildCommand = new BuildCommand(Log, testAsset.TestRoot);
278278
buildCommand
279-
.Execute($"/p:OutputType=Library;TargetFramework={targetFramework};VersionPrefix=1.2.3")
279+
.Execute($"/p:OutputType=Library", $"/p:TargetFramework={targetFramework}", $"/p:VersionPrefix=1.2.3")
280280
.Should()
281281
.Pass();
282282

@@ -302,7 +302,7 @@ public void It_respects_version_changes_on_incremental_build(string targetFramew
302302
var testAsset = _testAssetsManager
303303
.CopyTestAsset("HelloWorld", identifier: targetFramework)
304304
.WithSource()
305-
.Restore(Log, "", $"/p:OutputType=Library;TargetFramework={targetFramework}");
305+
.Restore(Log, "", $"/p:OutputType=Library", $"/p:TargetFramework={targetFramework}");
306306
BuildProject(versionPrefix: "1.2.3");
307307

308308
// When the same project is built again using a different VersionPrefix proeprty
@@ -316,7 +316,7 @@ public void It_respects_version_changes_on_incremental_build(string targetFramew
316316
BuildCommand BuildProject(string versionPrefix)
317317
{
318318
var command = new BuildCommand(Log, testAsset.TestRoot);
319-
command.Execute($"/p:OutputType=Library;TargetFramework={targetFramework};VersionPrefix={versionPrefix}")
319+
command.Execute($"/p:OutputType=Library", $"/p:TargetFramework={targetFramework}", $"/p:VersionPrefix={versionPrefix}")
320320
.Should()
321321
.Pass();
322322
return command;

src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAProjectWithDependencies.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,8 @@ public void It_publishes_documentation_files(string properties, bool expectAppDo
224224
kitchenSinkAsset.Restore(Log, "TestApp");
225225

226226
var publishCommand = new PublishCommand(Log, Path.Combine(kitchenSinkAsset.TestRoot, "TestApp"));
227-
var publishResult = publishCommand.Execute("/p:" + properties);
227+
var publishArgs = properties.Split(';').Select(p => $"/p:{p}").ToArray();
228+
var publishResult = publishCommand.Execute(publishArgs);
228229

229230
publishResult.Should().Pass();
230231

0 commit comments

Comments
 (0)