Revert "Fix MSBuild invocation to quote property option values."
This reverts commit f9b939fe89
.
That fix caused a regression that prevented a single `/property` option to
define multiple properties using the `/property:First=foo;Second=bar` syntax.
Users that want literal semicolons in the property values should use escaped
quotes around the property value, e.g. `/property:Prop='"foo;bar;baz"'`.
Fixes #9369.
This commit is contained in:
parent
c9d457a6b9
commit
98dd811aa8
11 changed files with 99 additions and 128 deletions
|
@ -24,14 +24,14 @@ namespace Microsoft.DotNet.Cli.MSBuild.Tests
|
|||
|
||||
[Theory]
|
||||
[InlineData(new string[] { }, "")]
|
||||
[InlineData(new string[] { "-r", "<rid>" }, @"-property:RuntimeIdentifier=\""<rid>\""")]
|
||||
[InlineData(new string[] { "--runtime", "<rid>" }, @"-property:RuntimeIdentifier=\""<rid>\""")]
|
||||
[InlineData(new string[] { "-o", "<publishdir>" }, @"-property:PublishDir=\""<publishdir>\""")]
|
||||
[InlineData(new string[] { "--output", "<publishdir>" }, @"-property:PublishDir=\""<publishdir>\""")]
|
||||
[InlineData(new string[] { "-c", "<config>" }, @"-property:Configuration=\""<config>\""")]
|
||||
[InlineData(new string[] { "--configuration", "<config>" }, @"-property:Configuration=\""<config>\""")]
|
||||
[InlineData(new string[] { "--version-suffix", "<versionsuffix>" }, @"-property:VersionSuffix=\""<versionsuffix>\""")]
|
||||
[InlineData(new string[] { "--manifest", "<manifestfiles>" }, @"-property:TargetManifestFiles=\""<manifestfiles>\""")]
|
||||
[InlineData(new string[] { "-r", "<rid>" }, "-property:RuntimeIdentifier=<rid>")]
|
||||
[InlineData(new string[] { "--runtime", "<rid>" }, "-property:RuntimeIdentifier=<rid>")]
|
||||
[InlineData(new string[] { "-o", "<publishdir>" }, "-property:PublishDir=<publishdir>")]
|
||||
[InlineData(new string[] { "--output", "<publishdir>" }, "-property:PublishDir=<publishdir>")]
|
||||
[InlineData(new string[] { "-c", "<config>" }, "-property:Configuration=<config>")]
|
||||
[InlineData(new string[] { "--configuration", "<config>" }, "-property:Configuration=<config>")]
|
||||
[InlineData(new string[] { "--version-suffix", "<versionsuffix>" }, "-property:VersionSuffix=<versionsuffix>")]
|
||||
[InlineData(new string[] { "--manifest", "<manifestfiles>" }, "-property:TargetManifestFiles=<manifestfiles>")]
|
||||
[InlineData(new string[] { "-v", "minimal" }, "-verbosity:minimal")]
|
||||
[InlineData(new string[] { "--verbosity", "minimal" }, "-verbosity:minimal")]
|
||||
[InlineData(new string[] { "<project>" }, "<project>")]
|
||||
|
@ -53,8 +53,8 @@ namespace Microsoft.DotNet.Cli.MSBuild.Tests
|
|||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(new string[] { "-f", "<tfm>" }, @"-property:TargetFramework=\""<tfm>\""")]
|
||||
[InlineData(new string[] { "--framework", "<tfm>" }, @"-property:TargetFramework=\""<tfm>\""")]
|
||||
[InlineData(new string[] { "-f", "<tfm>" }, "-property:TargetFramework=<tfm>")]
|
||||
[InlineData(new string[] { "--framework", "<tfm>" }, "-property:TargetFramework=<tfm>")]
|
||||
public void MsbuildInvocationIsCorrectForSeparateRestore(string[] args, string expectedAdditionalArgs)
|
||||
{
|
||||
expectedAdditionalArgs = (string.IsNullOrEmpty(expectedAdditionalArgs) ? "" : $" {expectedAdditionalArgs}");
|
||||
|
@ -86,7 +86,7 @@ namespace Microsoft.DotNet.Cli.MSBuild.Tests
|
|||
command.GetProcessStartInfo()
|
||||
.Arguments
|
||||
.Should()
|
||||
.Be($"{ExpectedPrefix} -target:Publish -property:NoBuild=\\\"true\\\"");
|
||||
.Be($"{ExpectedPrefix} -target:Publish -property:NoBuild=true");
|
||||
}
|
||||
|
||||
[Theory]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue