From 661cbe9d6b0f5fdcf92f8e412955dcfd78550a8c Mon Sep 17 00:00:00 2001 From: Tanner Gooding Date: Wed, 14 Oct 2015 19:06:20 -0700 Subject: [PATCH] Updating the MSBuildTasks to properly emit PathMap when generating the response commands. --- src/Compilers/Core/MSBuildTask/ManagedCompiler.cs | 1 + src/Compilers/Core/MSBuildTaskTests/CscTests.cs | 2 +- src/Compilers/Core/MSBuildTaskTests/VbcTests.cs | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Compilers/Core/MSBuildTask/ManagedCompiler.cs b/src/Compilers/Core/MSBuildTask/ManagedCompiler.cs index acc184011c6..834766dc60e 100644 --- a/src/Compilers/Core/MSBuildTask/ManagedCompiler.cs +++ b/src/Compilers/Core/MSBuildTask/ManagedCompiler.cs @@ -636,6 +636,7 @@ protected internal virtual void AddResponseFileCommands(CommandLineBuilderExtens commandLine.AppendWhenTrue("/nowin32manifest", _store, nameof(NoWin32Manifest)); commandLine.AppendPlusOrMinusSwitch("/optimize", _store, nameof(Optimize)); commandLine.AppendPlusOrMinusSwitch("/deterministic", _store, nameof(Deterministic)); + commandLine.AppendSwitchIfNotNull("/pathmap:", PathMap); commandLine.AppendSwitchIfNotNull("/out:", OutputAssembly); commandLine.AppendSwitchIfNotNull("/ruleset:", CodeAnalysisRuleSet); commandLine.AppendSwitchIfNotNull("/errorlog:", ErrorLog); diff --git a/src/Compilers/Core/MSBuildTaskTests/CscTests.cs b/src/Compilers/Core/MSBuildTaskTests/CscTests.cs index 584fb8a1480..7611a0a4e8f 100644 --- a/src/Compilers/Core/MSBuildTaskTests/CscTests.cs +++ b/src/Compilers/Core/MSBuildTaskTests/CscTests.cs @@ -33,7 +33,7 @@ public void PathMapOption() var csc = new Csc(); csc.Sources = MSBuildUtil.CreateTaskItems("test.cs"); csc.PathMap = "K1=V1,K2=V2"; - Assert.Equal("/pathmap:\"K1=V1,K2=V2\" /out:test.exe test.cs", csc.GenerateResponseFileContents()); + Assert.Equal("/pathmap:K1=V1,K2=V2 /out:test.exe test.cs", csc.GenerateResponseFileContents()); csc = new Csc(); csc.Sources = MSBuildUtil.CreateTaskItems("test.cs"); diff --git a/src/Compilers/Core/MSBuildTaskTests/VbcTests.cs b/src/Compilers/Core/MSBuildTaskTests/VbcTests.cs index c109920417c..0fc2bdcbe20 100644 --- a/src/Compilers/Core/MSBuildTaskTests/VbcTests.cs +++ b/src/Compilers/Core/MSBuildTaskTests/VbcTests.cs @@ -30,7 +30,7 @@ public void PathMapOption() var vbc = new Vbc(); vbc.Sources = MSBuildUtil.CreateTaskItems("test.vb"); vbc.PathMap = "K1=V1,K2=V2"; - Assert.Equal("/optionstrict:custom /pathmap:\"K1=V1,K2=V2\" /out:test.exe test.vb", vbc.GenerateResponseFileContents()); + Assert.Equal("/optionstrict:custom /pathmap:K1=V1,K2=V2 /out:test.exe test.vb", vbc.GenerateResponseFileContents()); vbc = new Vbc(); vbc.Sources = MSBuildUtil.CreateTaskItems("test.vb"); -- GitLab