提交 661cbe9d 编写于 作者: T Tanner Gooding

Updating the MSBuildTasks to properly emit PathMap when generating the response commands.

上级 5d034814
...@@ -636,6 +636,7 @@ protected internal virtual void AddResponseFileCommands(CommandLineBuilderExtens ...@@ -636,6 +636,7 @@ protected internal virtual void AddResponseFileCommands(CommandLineBuilderExtens
commandLine.AppendWhenTrue("/nowin32manifest", _store, nameof(NoWin32Manifest)); commandLine.AppendWhenTrue("/nowin32manifest", _store, nameof(NoWin32Manifest));
commandLine.AppendPlusOrMinusSwitch("/optimize", _store, nameof(Optimize)); commandLine.AppendPlusOrMinusSwitch("/optimize", _store, nameof(Optimize));
commandLine.AppendPlusOrMinusSwitch("/deterministic", _store, nameof(Deterministic)); commandLine.AppendPlusOrMinusSwitch("/deterministic", _store, nameof(Deterministic));
commandLine.AppendSwitchIfNotNull("/pathmap:", PathMap);
commandLine.AppendSwitchIfNotNull("/out:", OutputAssembly); commandLine.AppendSwitchIfNotNull("/out:", OutputAssembly);
commandLine.AppendSwitchIfNotNull("/ruleset:", CodeAnalysisRuleSet); commandLine.AppendSwitchIfNotNull("/ruleset:", CodeAnalysisRuleSet);
commandLine.AppendSwitchIfNotNull("/errorlog:", ErrorLog); commandLine.AppendSwitchIfNotNull("/errorlog:", ErrorLog);
......
...@@ -33,7 +33,7 @@ public void PathMapOption() ...@@ -33,7 +33,7 @@ public void PathMapOption()
var csc = new Csc(); var csc = new Csc();
csc.Sources = MSBuildUtil.CreateTaskItems("test.cs"); csc.Sources = MSBuildUtil.CreateTaskItems("test.cs");
csc.PathMap = "K1=V1,K2=V2"; 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 = new Csc();
csc.Sources = MSBuildUtil.CreateTaskItems("test.cs"); csc.Sources = MSBuildUtil.CreateTaskItems("test.cs");
......
...@@ -30,7 +30,7 @@ public void PathMapOption() ...@@ -30,7 +30,7 @@ public void PathMapOption()
var vbc = new Vbc(); var vbc = new Vbc();
vbc.Sources = MSBuildUtil.CreateTaskItems("test.vb"); vbc.Sources = MSBuildUtil.CreateTaskItems("test.vb");
vbc.PathMap = "K1=V1,K2=V2"; 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 = new Vbc();
vbc.Sources = MSBuildUtil.CreateTaskItems("test.vb"); vbc.Sources = MSBuildUtil.CreateTaskItems("test.vb");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册