144 references to GenerateResponseFileContents
Microsoft.Build.Tasks.CodeAnalysis (1)
src\Compilers\Core\MSBuildTask\ManagedToolTask.cs (1)
118/// <see cref="GenerateResponseFileContents"/>
Microsoft.Build.Tasks.CodeAnalysis.UnitTests (143)
CscTests.cs (69)
29Assert.Equal("/out:test.exe test.cs", csc.GenerateResponseFileContents()); 37Assert.Equal("/out:test1.exe test1.cs test2.cs", csc.GenerateResponseFileContents()); 46Assert.Equal("/pathmap:\"K1=V1,K2=V2\" /out:test.exe test.cs", csc.GenerateResponseFileContents()); 50Assert.Equal("/out:test.exe test.cs", csc.GenerateResponseFileContents()); 59Assert.Equal("/out:test.exe /deterministic+ test.cs", csc.GenerateResponseFileContents()); 64Assert.Equal("/out:test.exe /deterministic- test.cs", csc.GenerateResponseFileContents()); 68Assert.Equal("/out:test.exe test.cs", csc.GenerateResponseFileContents()); 77Assert.Equal("/out:test.exe /publicsign+ test.cs", csc.GenerateResponseFileContents()); 82Assert.Equal("/out:test.exe /publicsign- test.cs", csc.GenerateResponseFileContents()); 86Assert.Equal("/out:test.exe test.cs", csc.GenerateResponseFileContents()); 95Assert.Equal("/out:test.exe /runtimemetadataversion:v1234 test.cs", csc.GenerateResponseFileContents()); 100Assert.Equal("/out:test.exe test.cs", csc.GenerateResponseFileContents()); 109Assert.Equal("/out:test.exe /langversion:iso-1 test.cs", csc.GenerateResponseFileContents()); 118Assert.Equal("/out:test.exe /checksumalgorithm:sha256 test.cs", csc.GenerateResponseFileContents()); 123Assert.Equal("/out:test.exe test.cs", csc.GenerateResponseFileContents()); 128Assert.Equal("/out:test.exe /checksumalgorithm: test.cs", csc.GenerateResponseFileContents()); 136Assert.Equal(string.Empty, csc.GenerateResponseFileContents()); 140Assert.Equal("/instrument:TestCoverage", csc.GenerateResponseFileContents()); 144Assert.Equal("/instrument:TestCoverage,Mumble", csc.GenerateResponseFileContents()); 148Assert.Equal("/instrument:TestCoverage,Mumble,Stumble", csc.GenerateResponseFileContents()); 157Assert.Equal("/out:test.dll /target:library test.cs", csc.GenerateResponseFileContents()); 166Assert.Equal("/out:test.exe /target:bad test.cs", csc.GenerateResponseFileContents()); 175Assert.Equal("/out:x.exe test.cs", csc.GenerateResponseFileContents()); 186Assert.Equal("/define:D1;D2 /out:test.exe test.cs", csc.GenerateResponseFileContents()); 202Assert.Equal("/out:test.exe /features:a /features:b test.cs", csc.GenerateResponseFileContents()); 219AssertEx.Equal("""/features:"InterceptorsNamespaces=NS1.NS2;NS3.NS4" /out:test.exe test.cs""", csc.GenerateResponseFileContents()); 228AssertEx.Equal("""/features:"InterceptorsNamespaces=NS1.NS2;NS3.NS4" /out:test.exe test.cs""", csc.GenerateResponseFileContents()); 238AssertEx.Equal("""/features:"InterceptorsNamespaces=NS1.NS2;NS3.NS4;NS5.NS6;NS7.NS8" /out:test.exe test.cs""", csc.GenerateResponseFileContents()); 249Assert.Equal("/out:test.exe test.cs", csc.GenerateResponseFileContents()); 259Assert.Equal("/debug:full /out:test.exe test.cs", csc.GenerateResponseFileContents()); 264Assert.Equal("/debug:pdbonly /out:test.exe test.cs", csc.GenerateResponseFileContents()); 269Assert.Equal("/debug:portable /out:test.exe test.cs", csc.GenerateResponseFileContents()); 274Assert.Equal("/debug:embedded /out:test.exe test.cs", csc.GenerateResponseFileContents()); 279Assert.Equal("/out:test.exe test.cs", csc.GenerateResponseFileContents()); 284Assert.Equal("/debug: /out:test.exe test.cs", csc.GenerateResponseFileContents()); 294Assert.Equal(@"/debug:portable /out:test.exe /sourcelink:""C:\x y\z.json"" test.cs", csc.GenerateResponseFileContents()); 300Assert.Equal(@"/debug:portable /out:test.exe test.cs", csc.GenerateResponseFileContents()); 306Assert.Equal(@"/debug:portable /out:test.exe /sourcelink: test.cs", csc.GenerateResponseFileContents()); 316Assert.Equal(@"/debug:portable /out:test.exe /embed:test.cs /embed:test.txt test.cs", csc.GenerateResponseFileContents()); 322Assert.Equal(@"/debug:portable /out:test.exe /embed:""C:\x y\z.json"" test.cs", csc.GenerateResponseFileContents()); 328Assert.Equal(@"/debug:portable /out:test.exe test.cs", csc.GenerateResponseFileContents()); 334Assert.Equal(@"/debug:full /out:test.exe test.cs", csc.GenerateResponseFileContents()); 345Assert.Equal(@"/out:test.exe /embed /embed:test.cs /embed:test.txt test.cs", csc.GenerateResponseFileContents()); 351Assert.Equal(@"/out:test.exe /embed test.cs", csc.GenerateResponseFileContents()); 360Assert.Equal("/out:test.exe /refout:ref\\test.dll test.cs", csc.GenerateResponseFileContents()); 369Assert.Equal("/out:test.exe /refonly test.cs", csc.GenerateResponseFileContents()); 378Assert.Equal("/nullable:enable /out:test.exe test.cs", csc.GenerateResponseFileContents()); 387Assert.Equal("/nullable:disable /out:test.exe test.cs", csc.GenerateResponseFileContents()); 396Assert.Equal("/nullable:safeonly /out:test.exe test.cs", csc.GenerateResponseFileContents()); 405Assert.Equal("/nullable:warnings /out:test.exe test.cs", csc.GenerateResponseFileContents()); 414Assert.Equal("/nullable:safeonlywarnings /out:test.exe test.cs", csc.GenerateResponseFileContents()); 423Assert.Equal("/out:test.exe test.cs", csc.GenerateResponseFileContents()); 431Assert.Equal("/out:test.exe test.cs", csc.GenerateResponseFileContents()); 439Assert.Equal(@"/nosdkpath", csc.GenerateResponseFileContents()); 449Assert.Equal("/out:test.exe test.cs", csc.GenerateResponseFileContents()); 455Assert.Equal("/out:test.exe test.cs", csc.GenerateResponseFileContents()); 460Assert.Equal("/out:test.exe test.cs", csc.GenerateResponseFileContents()); 527Assert.Equal(@"/out:test.exe /analyzerconfig:.editorconfig test.cs", csc.GenerateResponseFileContents()); 532Assert.Equal($@"/out:test.exe /analyzerconfig:.editorconfig /analyzerconfig:subdir\.editorconfig test.cs subdir{Path.DirectorySeparatorChar}test.cs", csc.GenerateResponseFileContents()); 537Assert.Equal(@"/out:test.exe /analyzerconfig:..\.editorconfig /analyzerconfig:""sub dir\.editorconfig"" test.cs", csc.GenerateResponseFileContents()); 547Assert.Equal("/out:test.exe /skipanalyzers+ test.cs", csc.GenerateResponseFileContents()); 552Assert.Equal("/out:test.exe /skipanalyzers- test.cs", csc.GenerateResponseFileContents()); 556Assert.Equal("/out:test.exe test.cs", csc.GenerateResponseFileContents()); 581AssertEx.Equal("/reportivts", csc.GenerateResponseFileContents()); 672Assert.Throws<ArgumentException>(() => csc.GenerateResponseFileContents()); 684AssertEx.Equal("/out:test.exe test.cs", csc.GenerateResponseFileContents()); 697var responseFileContents = csc.GenerateResponseFileContents(); 712var responseFileContents = csc.GenerateResponseFileContents(); 730var responseFileContents = csc.GenerateResponseFileContents();
CsiTests.cs (8)
17Assert.Equal("/i- test.csx", csi.GenerateResponseFileContents()); 28Assert.Equal("/i- /features:a /features:b test.csx", csi.GenerateResponseFileContents()); 47Assert.Equal("/i- test.csx", csi.GenerateResponseFileContents()); 57Assert.Equal("/i- test.csx -Arg1 -Arg2", csi.GenerateResponseFileContents()); 66Assert.Equal(@"/i- test.csx ""C:\Some Path\Some File.ini"" ""C:\Some Path\Some Other File.bak""", csi.GenerateResponseFileContents()); 75Assert.Equal(@"/i- test.csx ""\""C:\Some Path\Some File.ini\"""" ""\""C:\Some Path\Some Other File.bak\""""", csi.GenerateResponseFileContents()); 84Assert.Equal(@"/i- test.csx", csi.GenerateResponseFileContents()); 93Assert.Equal(@"/i- test.csx", csi.GenerateResponseFileContents());
TestUtilities\TaskTestUtil.cs (1)
24var rsp = task.GenerateResponseFileContents();
VbcTests.cs (65)
30Assert.Equal("/optionstrict:custom /out:test.exe test.vb", vbc.GenerateResponseFileContents()); 38Assert.Equal("/optionstrict:custom /out:test1.exe test1.vb test2.vb", vbc.GenerateResponseFileContents()); 47Assert.Equal("/optionstrict:custom /pathmap:\"K1=V1,K2=V2\" /out:test.exe test.vb", vbc.GenerateResponseFileContents()); 51Assert.Equal("/optionstrict:custom /out:test.exe test.vb", vbc.GenerateResponseFileContents()); 60Assert.Equal("/optionstrict:custom /out:test.exe /deterministic+ test.vb", vbc.GenerateResponseFileContents()); 65Assert.Equal("/optionstrict:custom /out:test.exe /deterministic- test.vb", vbc.GenerateResponseFileContents()); 69Assert.Equal("/optionstrict:custom /out:test.exe test.vb", vbc.GenerateResponseFileContents()); 78Assert.Equal("/optionstrict:custom /out:test.exe /publicsign+ test.vb", vbc.GenerateResponseFileContents()); 83Assert.Equal("/optionstrict:custom /out:test.exe /publicsign- test.vb", vbc.GenerateResponseFileContents()); 87Assert.Equal("/optionstrict:custom /out:test.exe test.vb", vbc.GenerateResponseFileContents()); 96Assert.Equal("/optionstrict:custom /out:test.exe /runtimemetadataversion:v1234 test.vb", vbc.GenerateResponseFileContents()); 101Assert.Equal("/optionstrict:custom /out:test.exe test.vb", vbc.GenerateResponseFileContents()); 110Assert.Equal("/optionstrict:custom /out:test.exe /langversion:15.3 test.vb", vbc.GenerateResponseFileContents()); 119Assert.Equal("/optionstrict:custom /out:test.exe /checksumalgorithm:sha256 test.vb", vbc.GenerateResponseFileContents()); 124Assert.Equal("/optionstrict:custom /out:test.exe test.vb", vbc.GenerateResponseFileContents()); 129Assert.Equal("/optionstrict:custom /out:test.exe /checksumalgorithm: test.vb", vbc.GenerateResponseFileContents()); 137Assert.Equal("/optionstrict:custom", vbc.GenerateResponseFileContents()); 141Assert.Equal("/optionstrict:custom /instrument:TestCoverage", vbc.GenerateResponseFileContents()); 145Assert.Equal("/optionstrict:custom /instrument:TestCoverage,Mumble", vbc.GenerateResponseFileContents()); 149Assert.Equal("/optionstrict:custom /instrument:TestCoverage,Mumble,Stumble", vbc.GenerateResponseFileContents()); 158Assert.Equal("/optionstrict:custom /out:test.dll /target:library test.vb", vbc.GenerateResponseFileContents()); 167Assert.Equal("/optionstrict:custom /out:test.exe /target:bad test.vb", vbc.GenerateResponseFileContents()); 176Assert.Equal("/optionstrict:custom /out:x.exe test.vb", vbc.GenerateResponseFileContents()); 187Assert.Equal($@"/optionstrict:custom /define:""{s}"" /out:test.exe test.vb", vbc.GenerateResponseFileContents()); 203Assert.Equal(@"/optionstrict:custom /out:test.exe /features:a /features:b test.vb", vbc.GenerateResponseFileContents()); 222Assert.Equal(@"/optionstrict:custom /out:test.exe test.vb", vbc.GenerateResponseFileContents()); 232Assert.Equal("/optionstrict:custom /debug:full /out:test.exe test.vb", vbc.GenerateResponseFileContents()); 237Assert.Equal("/optionstrict:custom /debug:pdbonly /out:test.exe test.vb", vbc.GenerateResponseFileContents()); 242Assert.Equal("/optionstrict:custom /debug:portable /out:test.exe test.vb", vbc.GenerateResponseFileContents()); 247Assert.Equal("/optionstrict:custom /debug:embedded /out:test.exe test.vb", vbc.GenerateResponseFileContents()); 252Assert.Equal("/optionstrict:custom /out:test.exe test.vb", vbc.GenerateResponseFileContents()); 257Assert.Equal("/optionstrict:custom /debug: /out:test.exe test.vb", vbc.GenerateResponseFileContents()); 267Assert.Equal(@"/optionstrict:custom /debug:portable /out:test.exe /sourcelink:""C:\x y\z.json"" test.vb", vbc.GenerateResponseFileContents()); 273Assert.Equal(@"/optionstrict:custom /debug:portable /out:test.exe test.vb", vbc.GenerateResponseFileContents()); 279Assert.Equal(@"/optionstrict:custom /debug:portable /out:test.exe /sourcelink: test.vb", vbc.GenerateResponseFileContents()); 289Assert.Equal(@"/optionstrict:custom /debug:portable /out:test.exe /embed:test.vb /embed:test.txt test.vb", vbc.GenerateResponseFileContents()); 295Assert.Equal(@"/optionstrict:custom /debug:portable /out:test.exe /embed:""C:\x y\z.json"" test.vb", vbc.GenerateResponseFileContents()); 301Assert.Equal(@"/optionstrict:custom /debug:portable /out:test.exe test.vb", vbc.GenerateResponseFileContents()); 307Assert.Equal(@"/optionstrict:custom /debug:full /out:test.exe test.vb", vbc.GenerateResponseFileContents()); 313Assert.Equal(@"/optionstrict:custom /debug:full /out:""a;b.exe"" /embed:""a;b.vb"" ""a;b.vb""", vbc.GenerateResponseFileContents()); 319Assert.Equal(@"/optionstrict:custom /debug:full /out:""a, b.exe"" /embed:""a, b.vb"" ""a, b.vb""", vbc.GenerateResponseFileContents()); 330Assert.Equal(@"/optionstrict:custom /out:test.exe /embed /embed:test.vb /embed:test.txt test.vb", vbc.GenerateResponseFileContents()); 336Assert.Equal(@"/optionstrict:custom /out:test.exe /embed test.vb", vbc.GenerateResponseFileContents()); 345Assert.Equal("/optionstrict:custom /out:test.exe /refout:ref\\test.dll test.vb", vbc.GenerateResponseFileContents()); 354Assert.Equal("/optionstrict:custom /out:test.exe /refonly test.vb", vbc.GenerateResponseFileContents()); 364Assert.Equal("/optionstrict:custom /out:test.exe test.vb", vbc.GenerateResponseFileContents()); 370Assert.Equal("/optionstrict:custom /out:test.exe test.vb", vbc.GenerateResponseFileContents()); 375Assert.Equal("/optionstrict:custom /out:test.exe test.vb", vbc.GenerateResponseFileContents()); 386Assert.Equal("/doc- /optionstrict:custom /out:test.exe test.vb", vbc.GenerateResponseFileContents()); 397Assert.Equal("/doc+ /optionstrict:custom /doc:test.xml /out:test.exe test.vb", vbc.GenerateResponseFileContents()); 407Assert.Equal("/doc+ /optionstrict:custom /out:test.exe test.vb", vbc.GenerateResponseFileContents()); 417Assert.Equal("/optionstrict:custom /doc:test.xml /out:test.exe test.vb", vbc.GenerateResponseFileContents()); 426Assert.Equal(@"/optionstrict:custom /sdkpath:path\to\sdk", vbc.GenerateResponseFileContents()); 435Assert.Equal(@"/optionstrict:custom /nosdkpath", vbc.GenerateResponseFileContents()); 468Assert.Equal(@"/optionstrict:custom /out:test.exe /analyzerconfig:.editorconfig test.vb", vbc.GenerateResponseFileContents()); 473Assert.Equal(@$"/optionstrict:custom /out:test.exe /analyzerconfig:.editorconfig /analyzerconfig:subdir\.editorconfig test.vb subdir{Path.DirectorySeparatorChar}test.vb", vbc.GenerateResponseFileContents()); 478Assert.Equal(@"/optionstrict:custom /out:test.exe /analyzerconfig:..\.editorconfig /analyzerconfig:""sub dir\.editorconfig"" test.vb", vbc.GenerateResponseFileContents()); 488Assert.Equal("/optionstrict:custom /out:test.exe /skipanalyzers+ test.vb", vbc.GenerateResponseFileContents()); 493Assert.Equal("/optionstrict:custom /out:test.exe /skipanalyzers- test.vb", vbc.GenerateResponseFileContents()); 497Assert.Equal("/optionstrict:custom /out:test.exe test.vb", vbc.GenerateResponseFileContents()); 553AssertEx.Equal("/optionstrict:custom /reportivts", vbc.GenerateResponseFileContents()); 591AssertEx.Equal("/optionstrict:custom /out:test.exe test.vb", vbc.GenerateResponseFileContents()); 604var responseFileContents = vbc.GenerateResponseFileContents(); 619var responseFileContents = vbc.GenerateResponseFileContents(); 637var responseFileContents = vbc.GenerateResponseFileContents();