138 references to GenerateResponseFileContents
Microsoft.Build.Tasks.CodeAnalysis (1)
src\Compilers\Core\MSBuildTask\ManagedToolTask.cs (1)
90/// <see cref="GenerateResponseFileContents"/>
Microsoft.Build.Tasks.CodeAnalysis.UnitTests (137)
CscTests.cs (66)
28Assert.Equal("/out:test.exe test.cs", csc.GenerateResponseFileContents()); 36Assert.Equal("/out:test1.exe test1.cs test2.cs", csc.GenerateResponseFileContents()); 45Assert.Equal("/pathmap:\"K1=V1,K2=V2\" /out:test.exe test.cs", csc.GenerateResponseFileContents()); 49Assert.Equal("/out:test.exe test.cs", csc.GenerateResponseFileContents()); 58Assert.Equal("/out:test.exe /deterministic+ test.cs", csc.GenerateResponseFileContents()); 63Assert.Equal("/out:test.exe /deterministic- test.cs", csc.GenerateResponseFileContents()); 67Assert.Equal("/out:test.exe test.cs", csc.GenerateResponseFileContents()); 76Assert.Equal("/out:test.exe /publicsign+ test.cs", csc.GenerateResponseFileContents()); 81Assert.Equal("/out:test.exe /publicsign- test.cs", csc.GenerateResponseFileContents()); 85Assert.Equal("/out:test.exe test.cs", csc.GenerateResponseFileContents()); 94Assert.Equal("/out:test.exe /runtimemetadataversion:v1234 test.cs", csc.GenerateResponseFileContents()); 99Assert.Equal("/out:test.exe test.cs", csc.GenerateResponseFileContents()); 108Assert.Equal("/out:test.exe /langversion:iso-1 test.cs", csc.GenerateResponseFileContents()); 117Assert.Equal("/out:test.exe /checksumalgorithm:sha256 test.cs", csc.GenerateResponseFileContents()); 122Assert.Equal("/out:test.exe test.cs", csc.GenerateResponseFileContents()); 127Assert.Equal("/out:test.exe /checksumalgorithm: test.cs", csc.GenerateResponseFileContents()); 135Assert.Equal(string.Empty, csc.GenerateResponseFileContents()); 139Assert.Equal("/instrument:TestCoverage", csc.GenerateResponseFileContents()); 143Assert.Equal("/instrument:TestCoverage,Mumble", csc.GenerateResponseFileContents()); 147Assert.Equal("/instrument:TestCoverage,Mumble,Stumble", csc.GenerateResponseFileContents()); 156Assert.Equal("/out:test.dll /target:library test.cs", csc.GenerateResponseFileContents()); 165Assert.Equal("/out:test.exe /target:bad test.cs", csc.GenerateResponseFileContents()); 174Assert.Equal("/out:x.exe test.cs", csc.GenerateResponseFileContents()); 185Assert.Equal("/define:D1;D2 /out:test.exe test.cs", csc.GenerateResponseFileContents()); 201Assert.Equal("/out:test.exe /features:a /features:b test.cs", csc.GenerateResponseFileContents()); 218AssertEx.Equal("""/features:"InterceptorsNamespaces=NS1.NS2;NS3.NS4" /out:test.exe test.cs""", csc.GenerateResponseFileContents()); 227AssertEx.Equal("""/features:"InterceptorsNamespaces=NS1.NS2;NS3.NS4" /out:test.exe test.cs""", csc.GenerateResponseFileContents()); 237AssertEx.Equal("""/features:"InterceptorsNamespaces=NS1.NS2;NS3.NS4;NS5.NS6;NS7.NS8" /out:test.exe test.cs""", csc.GenerateResponseFileContents()); 248Assert.Equal("/out:test.exe test.cs", csc.GenerateResponseFileContents()); 258Assert.Equal("/debug:full /out:test.exe test.cs", csc.GenerateResponseFileContents()); 263Assert.Equal("/debug:pdbonly /out:test.exe test.cs", csc.GenerateResponseFileContents()); 268Assert.Equal("/debug:portable /out:test.exe test.cs", csc.GenerateResponseFileContents()); 273Assert.Equal("/debug:embedded /out:test.exe test.cs", csc.GenerateResponseFileContents()); 278Assert.Equal("/out:test.exe test.cs", csc.GenerateResponseFileContents()); 283Assert.Equal("/debug: /out:test.exe test.cs", csc.GenerateResponseFileContents()); 293Assert.Equal(@"/debug:portable /out:test.exe /sourcelink:""C:\x y\z.json"" test.cs", csc.GenerateResponseFileContents()); 299Assert.Equal(@"/debug:portable /out:test.exe test.cs", csc.GenerateResponseFileContents()); 305Assert.Equal(@"/debug:portable /out:test.exe /sourcelink: test.cs", csc.GenerateResponseFileContents()); 315Assert.Equal(@"/debug:portable /out:test.exe /embed:test.cs /embed:test.txt test.cs", csc.GenerateResponseFileContents()); 321Assert.Equal(@"/debug:portable /out:test.exe /embed:""C:\x y\z.json"" test.cs", csc.GenerateResponseFileContents()); 327Assert.Equal(@"/debug:portable /out:test.exe test.cs", csc.GenerateResponseFileContents()); 333Assert.Equal(@"/debug:full /out:test.exe test.cs", csc.GenerateResponseFileContents()); 344Assert.Equal(@"/out:test.exe /embed /embed:test.cs /embed:test.txt test.cs", csc.GenerateResponseFileContents()); 350Assert.Equal(@"/out:test.exe /embed test.cs", csc.GenerateResponseFileContents()); 359Assert.Equal("/out:test.exe /refout:ref\\test.dll test.cs", csc.GenerateResponseFileContents()); 368Assert.Equal("/out:test.exe /refonly test.cs", csc.GenerateResponseFileContents()); 377Assert.Equal("/nullable:enable /out:test.exe test.cs", csc.GenerateResponseFileContents()); 386Assert.Equal("/nullable:disable /out:test.exe test.cs", csc.GenerateResponseFileContents()); 395Assert.Equal("/nullable:safeonly /out:test.exe test.cs", csc.GenerateResponseFileContents()); 404Assert.Equal("/nullable:warnings /out:test.exe test.cs", csc.GenerateResponseFileContents()); 413Assert.Equal("/nullable:safeonlywarnings /out:test.exe test.cs", csc.GenerateResponseFileContents()); 422Assert.Equal("/out:test.exe test.cs", csc.GenerateResponseFileContents()); 430Assert.Equal("/out:test.exe test.cs", csc.GenerateResponseFileContents()); 438Assert.Equal(@"/nosdkpath", csc.GenerateResponseFileContents()); 448Assert.Equal("/out:test.exe test.cs", csc.GenerateResponseFileContents()); 454Assert.Equal("/out:test.exe test.cs", csc.GenerateResponseFileContents()); 459Assert.Equal("/out:test.exe test.cs", csc.GenerateResponseFileContents()); 503Assert.Equal(@"/out:test.exe /analyzerconfig:.editorconfig test.cs", csc.GenerateResponseFileContents()); 508Assert.Equal($@"/out:test.exe /analyzerconfig:.editorconfig /analyzerconfig:subdir\.editorconfig test.cs subdir{Path.DirectorySeparatorChar}test.cs", csc.GenerateResponseFileContents()); 513Assert.Equal(@"/out:test.exe /analyzerconfig:..\.editorconfig /analyzerconfig:""sub dir\.editorconfig"" test.cs", csc.GenerateResponseFileContents()); 523Assert.Equal("/out:test.exe /skipanalyzers+ test.cs", csc.GenerateResponseFileContents()); 528Assert.Equal("/out:test.exe /skipanalyzers- test.cs", csc.GenerateResponseFileContents()); 532Assert.Equal("/out:test.exe test.cs", csc.GenerateResponseFileContents()); 557AssertEx.Equal("/reportivts", csc.GenerateResponseFileContents()); 648Assert.Throws<ArgumentException>(() => csc.GenerateResponseFileContents()); 660AssertEx.Equal("/out:test.exe test.cs", 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 (62)
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()); 566AssertEx.Equal("/optionstrict:custom /out:test.exe test.vb", vbc.GenerateResponseFileContents());