136 references to GenerateResponseFileContents
Microsoft.Build.Tasks.CodeAnalysis (1)
src\Compilers\Core\MSBuildTask\ManagedToolTask.cs (1)
90/// <see cref="GenerateResponseFileContents"/>
Microsoft.Build.Tasks.CodeAnalysis.UnitTests (135)
CscTests.cs (65)
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()); 504Assert.Equal(@"/out:test.exe /analyzerconfig:.editorconfig test.cs", csc.GenerateResponseFileContents()); 509Assert.Equal($@"/out:test.exe /analyzerconfig:.editorconfig /analyzerconfig:subdir\.editorconfig test.cs subdir{Path.DirectorySeparatorChar}test.cs", csc.GenerateResponseFileContents()); 514Assert.Equal(@"/out:test.exe /analyzerconfig:..\.editorconfig /analyzerconfig:""sub dir\.editorconfig"" test.cs", csc.GenerateResponseFileContents()); 524Assert.Equal("/out:test.exe /skipanalyzers+ test.cs", csc.GenerateResponseFileContents()); 529Assert.Equal("/out:test.exe /skipanalyzers- test.cs", csc.GenerateResponseFileContents()); 533Assert.Equal("/out:test.exe test.cs", csc.GenerateResponseFileContents()); 558AssertEx.Equal("/reportivts", csc.GenerateResponseFileContents()); 649Assert.Throws<ArgumentException>(() => 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 (61)
29Assert.Equal("/optionstrict:custom /out:test.exe test.vb", vbc.GenerateResponseFileContents()); 37Assert.Equal("/optionstrict:custom /out:test1.exe test1.vb test2.vb", vbc.GenerateResponseFileContents()); 46Assert.Equal("/optionstrict:custom /pathmap:\"K1=V1,K2=V2\" /out:test.exe test.vb", vbc.GenerateResponseFileContents()); 50Assert.Equal("/optionstrict:custom /out:test.exe test.vb", vbc.GenerateResponseFileContents()); 59Assert.Equal("/optionstrict:custom /out:test.exe /deterministic+ test.vb", vbc.GenerateResponseFileContents()); 64Assert.Equal("/optionstrict:custom /out:test.exe /deterministic- test.vb", vbc.GenerateResponseFileContents()); 68Assert.Equal("/optionstrict:custom /out:test.exe test.vb", vbc.GenerateResponseFileContents()); 77Assert.Equal("/optionstrict:custom /out:test.exe /publicsign+ test.vb", vbc.GenerateResponseFileContents()); 82Assert.Equal("/optionstrict:custom /out:test.exe /publicsign- test.vb", vbc.GenerateResponseFileContents()); 86Assert.Equal("/optionstrict:custom /out:test.exe test.vb", vbc.GenerateResponseFileContents()); 95Assert.Equal("/optionstrict:custom /out:test.exe /runtimemetadataversion:v1234 test.vb", vbc.GenerateResponseFileContents()); 100Assert.Equal("/optionstrict:custom /out:test.exe test.vb", vbc.GenerateResponseFileContents()); 109Assert.Equal("/optionstrict:custom /out:test.exe /langversion:15.3 test.vb", vbc.GenerateResponseFileContents()); 118Assert.Equal("/optionstrict:custom /out:test.exe /checksumalgorithm:sha256 test.vb", vbc.GenerateResponseFileContents()); 123Assert.Equal("/optionstrict:custom /out:test.exe test.vb", vbc.GenerateResponseFileContents()); 128Assert.Equal("/optionstrict:custom /out:test.exe /checksumalgorithm: test.vb", vbc.GenerateResponseFileContents()); 136Assert.Equal("/optionstrict:custom", vbc.GenerateResponseFileContents()); 140Assert.Equal("/optionstrict:custom /instrument:TestCoverage", vbc.GenerateResponseFileContents()); 144Assert.Equal("/optionstrict:custom /instrument:TestCoverage,Mumble", vbc.GenerateResponseFileContents()); 148Assert.Equal("/optionstrict:custom /instrument:TestCoverage,Mumble,Stumble", vbc.GenerateResponseFileContents()); 157Assert.Equal("/optionstrict:custom /out:test.dll /target:library test.vb", vbc.GenerateResponseFileContents()); 166Assert.Equal("/optionstrict:custom /out:test.exe /target:bad test.vb", vbc.GenerateResponseFileContents()); 175Assert.Equal("/optionstrict:custom /out:x.exe test.vb", vbc.GenerateResponseFileContents()); 186Assert.Equal($@"/optionstrict:custom /define:""{s}"" /out:test.exe test.vb", vbc.GenerateResponseFileContents()); 202Assert.Equal(@"/optionstrict:custom /out:test.exe /features:a /features:b test.vb", vbc.GenerateResponseFileContents()); 221Assert.Equal(@"/optionstrict:custom /out:test.exe test.vb", vbc.GenerateResponseFileContents()); 231Assert.Equal("/optionstrict:custom /debug:full /out:test.exe test.vb", vbc.GenerateResponseFileContents()); 236Assert.Equal("/optionstrict:custom /debug:pdbonly /out:test.exe test.vb", vbc.GenerateResponseFileContents()); 241Assert.Equal("/optionstrict:custom /debug:portable /out:test.exe test.vb", vbc.GenerateResponseFileContents()); 246Assert.Equal("/optionstrict:custom /debug:embedded /out:test.exe test.vb", vbc.GenerateResponseFileContents()); 251Assert.Equal("/optionstrict:custom /out:test.exe test.vb", vbc.GenerateResponseFileContents()); 256Assert.Equal("/optionstrict:custom /debug: /out:test.exe test.vb", vbc.GenerateResponseFileContents()); 266Assert.Equal(@"/optionstrict:custom /debug:portable /out:test.exe /sourcelink:""C:\x y\z.json"" test.vb", vbc.GenerateResponseFileContents()); 272Assert.Equal(@"/optionstrict:custom /debug:portable /out:test.exe test.vb", vbc.GenerateResponseFileContents()); 278Assert.Equal(@"/optionstrict:custom /debug:portable /out:test.exe /sourcelink: test.vb", vbc.GenerateResponseFileContents()); 288Assert.Equal(@"/optionstrict:custom /debug:portable /out:test.exe /embed:test.vb /embed:test.txt test.vb", vbc.GenerateResponseFileContents()); 294Assert.Equal(@"/optionstrict:custom /debug:portable /out:test.exe /embed:""C:\x y\z.json"" test.vb", vbc.GenerateResponseFileContents()); 300Assert.Equal(@"/optionstrict:custom /debug:portable /out:test.exe test.vb", vbc.GenerateResponseFileContents()); 306Assert.Equal(@"/optionstrict:custom /debug:full /out:test.exe test.vb", vbc.GenerateResponseFileContents()); 312Assert.Equal(@"/optionstrict:custom /debug:full /out:""a;b.exe"" /embed:""a;b.vb"" ""a;b.vb""", vbc.GenerateResponseFileContents()); 318Assert.Equal(@"/optionstrict:custom /debug:full /out:""a, b.exe"" /embed:""a, b.vb"" ""a, b.vb""", vbc.GenerateResponseFileContents()); 329Assert.Equal(@"/optionstrict:custom /out:test.exe /embed /embed:test.vb /embed:test.txt test.vb", vbc.GenerateResponseFileContents()); 335Assert.Equal(@"/optionstrict:custom /out:test.exe /embed test.vb", vbc.GenerateResponseFileContents()); 344Assert.Equal("/optionstrict:custom /out:test.exe /refout:ref\\test.dll test.vb", vbc.GenerateResponseFileContents()); 353Assert.Equal("/optionstrict:custom /out:test.exe /refonly test.vb", vbc.GenerateResponseFileContents()); 363Assert.Equal("/optionstrict:custom /out:test.exe test.vb", vbc.GenerateResponseFileContents()); 369Assert.Equal("/optionstrict:custom /out:test.exe test.vb", vbc.GenerateResponseFileContents()); 374Assert.Equal("/optionstrict:custom /out:test.exe test.vb", vbc.GenerateResponseFileContents()); 385Assert.Equal("/doc- /optionstrict:custom /out:test.exe test.vb", vbc.GenerateResponseFileContents()); 396Assert.Equal("/doc+ /optionstrict:custom /doc:test.xml /out:test.exe test.vb", vbc.GenerateResponseFileContents()); 406Assert.Equal("/doc+ /optionstrict:custom /out:test.exe test.vb", vbc.GenerateResponseFileContents()); 416Assert.Equal("/optionstrict:custom /doc:test.xml /out:test.exe test.vb", vbc.GenerateResponseFileContents()); 425Assert.Equal(@"/optionstrict:custom /sdkpath:path\to\sdk", vbc.GenerateResponseFileContents()); 434Assert.Equal(@"/optionstrict:custom /nosdkpath", vbc.GenerateResponseFileContents()); 443Assert.Equal(@"/optionstrict:custom /out:test.exe /analyzerconfig:.editorconfig test.vb", vbc.GenerateResponseFileContents()); 448Assert.Equal(@$"/optionstrict:custom /out:test.exe /analyzerconfig:.editorconfig /analyzerconfig:subdir\.editorconfig test.vb subdir{Path.DirectorySeparatorChar}test.vb", vbc.GenerateResponseFileContents()); 453Assert.Equal(@"/optionstrict:custom /out:test.exe /analyzerconfig:..\.editorconfig /analyzerconfig:""sub dir\.editorconfig"" test.vb", vbc.GenerateResponseFileContents()); 463Assert.Equal("/optionstrict:custom /out:test.exe /skipanalyzers+ test.vb", vbc.GenerateResponseFileContents()); 468Assert.Equal("/optionstrict:custom /out:test.exe /skipanalyzers- test.vb", vbc.GenerateResponseFileContents()); 472Assert.Equal("/optionstrict:custom /out:test.exe test.vb", vbc.GenerateResponseFileContents()); 528AssertEx.Equal("/optionstrict:custom /reportivts", vbc.GenerateResponseFileContents());