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)
29
Assert.Equal("/out:test.exe test.cs", csc.
GenerateResponseFileContents
());
37
Assert.Equal("/out:test1.exe test1.cs test2.cs", csc.
GenerateResponseFileContents
());
46
Assert.Equal("/pathmap:\"K1=V1,K2=V2\" /out:test.exe test.cs", csc.
GenerateResponseFileContents
());
50
Assert.Equal("/out:test.exe test.cs", csc.
GenerateResponseFileContents
());
59
Assert.Equal("/out:test.exe /deterministic+ test.cs", csc.
GenerateResponseFileContents
());
64
Assert.Equal("/out:test.exe /deterministic- test.cs", csc.
GenerateResponseFileContents
());
68
Assert.Equal("/out:test.exe test.cs", csc.
GenerateResponseFileContents
());
77
Assert.Equal("/out:test.exe /publicsign+ test.cs", csc.
GenerateResponseFileContents
());
82
Assert.Equal("/out:test.exe /publicsign- test.cs", csc.
GenerateResponseFileContents
());
86
Assert.Equal("/out:test.exe test.cs", csc.
GenerateResponseFileContents
());
95
Assert.Equal("/out:test.exe /runtimemetadataversion:v1234 test.cs", csc.
GenerateResponseFileContents
());
100
Assert.Equal("/out:test.exe test.cs", csc.
GenerateResponseFileContents
());
109
Assert.Equal("/out:test.exe /langversion:iso-1 test.cs", csc.
GenerateResponseFileContents
());
118
Assert.Equal("/out:test.exe /checksumalgorithm:sha256 test.cs", csc.
GenerateResponseFileContents
());
123
Assert.Equal("/out:test.exe test.cs", csc.
GenerateResponseFileContents
());
128
Assert.Equal("/out:test.exe /checksumalgorithm: test.cs", csc.
GenerateResponseFileContents
());
136
Assert.Equal(string.Empty, csc.
GenerateResponseFileContents
());
140
Assert.Equal("/instrument:TestCoverage", csc.
GenerateResponseFileContents
());
144
Assert.Equal("/instrument:TestCoverage,Mumble", csc.
GenerateResponseFileContents
());
148
Assert.Equal("/instrument:TestCoverage,Mumble,Stumble", csc.
GenerateResponseFileContents
());
157
Assert.Equal("/out:test.dll /target:library test.cs", csc.
GenerateResponseFileContents
());
166
Assert.Equal("/out:test.exe /target:bad test.cs", csc.
GenerateResponseFileContents
());
175
Assert.Equal("/out:x.exe test.cs", csc.
GenerateResponseFileContents
());
186
Assert.Equal("/define:D1;D2 /out:test.exe test.cs", csc.
GenerateResponseFileContents
());
202
Assert.Equal("/out:test.exe /features:a /features:b test.cs", csc.
GenerateResponseFileContents
());
219
AssertEx.Equal("""/features:"InterceptorsNamespaces=NS1.NS2;NS3.NS4" /out:test.exe test.cs""", csc.
GenerateResponseFileContents
());
228
AssertEx.Equal("""/features:"InterceptorsNamespaces=NS1.NS2;NS3.NS4" /out:test.exe test.cs""", csc.
GenerateResponseFileContents
());
238
AssertEx.Equal("""/features:"InterceptorsNamespaces=NS1.NS2;NS3.NS4;NS5.NS6;NS7.NS8" /out:test.exe test.cs""", csc.
GenerateResponseFileContents
());
249
Assert.Equal("/out:test.exe test.cs", csc.
GenerateResponseFileContents
());
259
Assert.Equal("/debug:full /out:test.exe test.cs", csc.
GenerateResponseFileContents
());
264
Assert.Equal("/debug:pdbonly /out:test.exe test.cs", csc.
GenerateResponseFileContents
());
269
Assert.Equal("/debug:portable /out:test.exe test.cs", csc.
GenerateResponseFileContents
());
274
Assert.Equal("/debug:embedded /out:test.exe test.cs", csc.
GenerateResponseFileContents
());
279
Assert.Equal("/out:test.exe test.cs", csc.
GenerateResponseFileContents
());
284
Assert.Equal("/debug: /out:test.exe test.cs", csc.
GenerateResponseFileContents
());
294
Assert.Equal(@"/debug:portable /out:test.exe /sourcelink:""C:\x y\z.json"" test.cs", csc.
GenerateResponseFileContents
());
300
Assert.Equal(@"/debug:portable /out:test.exe test.cs", csc.
GenerateResponseFileContents
());
306
Assert.Equal(@"/debug:portable /out:test.exe /sourcelink: test.cs", csc.
GenerateResponseFileContents
());
316
Assert.Equal(@"/debug:portable /out:test.exe /embed:test.cs /embed:test.txt test.cs", csc.
GenerateResponseFileContents
());
322
Assert.Equal(@"/debug:portable /out:test.exe /embed:""C:\x y\z.json"" test.cs", csc.
GenerateResponseFileContents
());
328
Assert.Equal(@"/debug:portable /out:test.exe test.cs", csc.
GenerateResponseFileContents
());
334
Assert.Equal(@"/debug:full /out:test.exe test.cs", csc.
GenerateResponseFileContents
());
345
Assert.Equal(@"/out:test.exe /embed /embed:test.cs /embed:test.txt test.cs", csc.
GenerateResponseFileContents
());
351
Assert.Equal(@"/out:test.exe /embed test.cs", csc.
GenerateResponseFileContents
());
360
Assert.Equal("/out:test.exe /refout:ref\\test.dll test.cs", csc.
GenerateResponseFileContents
());
369
Assert.Equal("/out:test.exe /refonly test.cs", csc.
GenerateResponseFileContents
());
378
Assert.Equal("/nullable:enable /out:test.exe test.cs", csc.
GenerateResponseFileContents
());
387
Assert.Equal("/nullable:disable /out:test.exe test.cs", csc.
GenerateResponseFileContents
());
396
Assert.Equal("/nullable:safeonly /out:test.exe test.cs", csc.
GenerateResponseFileContents
());
405
Assert.Equal("/nullable:warnings /out:test.exe test.cs", csc.
GenerateResponseFileContents
());
414
Assert.Equal("/nullable:safeonlywarnings /out:test.exe test.cs", csc.
GenerateResponseFileContents
());
423
Assert.Equal("/out:test.exe test.cs", csc.
GenerateResponseFileContents
());
431
Assert.Equal("/out:test.exe test.cs", csc.
GenerateResponseFileContents
());
439
Assert.Equal(@"/nosdkpath", csc.
GenerateResponseFileContents
());
449
Assert.Equal("/out:test.exe test.cs", csc.
GenerateResponseFileContents
());
455
Assert.Equal("/out:test.exe test.cs", csc.
GenerateResponseFileContents
());
460
Assert.Equal("/out:test.exe test.cs", csc.
GenerateResponseFileContents
());
504
Assert.Equal(@"/out:test.exe /analyzerconfig:.editorconfig test.cs", csc.
GenerateResponseFileContents
());
509
Assert.Equal($@"/out:test.exe /analyzerconfig:.editorconfig /analyzerconfig:subdir\.editorconfig test.cs subdir{Path.DirectorySeparatorChar}test.cs", csc.
GenerateResponseFileContents
());
514
Assert.Equal(@"/out:test.exe /analyzerconfig:..\.editorconfig /analyzerconfig:""sub dir\.editorconfig"" test.cs", csc.
GenerateResponseFileContents
());
524
Assert.Equal("/out:test.exe /skipanalyzers+ test.cs", csc.
GenerateResponseFileContents
());
529
Assert.Equal("/out:test.exe /skipanalyzers- test.cs", csc.
GenerateResponseFileContents
());
533
Assert.Equal("/out:test.exe test.cs", csc.
GenerateResponseFileContents
());
558
AssertEx.Equal("/reportivts", csc.
GenerateResponseFileContents
());
649
Assert.Throws<ArgumentException>(() => csc.
GenerateResponseFileContents
());
CsiTests.cs (8)
17
Assert.Equal("/i- test.csx", csi.
GenerateResponseFileContents
());
28
Assert.Equal("/i- /features:a /features:b test.csx", csi.
GenerateResponseFileContents
());
47
Assert.Equal("/i- test.csx", csi.
GenerateResponseFileContents
());
57
Assert.Equal("/i- test.csx -Arg1 -Arg2", csi.
GenerateResponseFileContents
());
66
Assert.Equal(@"/i- test.csx ""C:\Some Path\Some File.ini"" ""C:\Some Path\Some Other File.bak""", csi.
GenerateResponseFileContents
());
75
Assert.Equal(@"/i- test.csx ""\""C:\Some Path\Some File.ini\"""" ""\""C:\Some Path\Some Other File.bak\""""", csi.
GenerateResponseFileContents
());
84
Assert.Equal(@"/i- test.csx", csi.
GenerateResponseFileContents
());
93
Assert.Equal(@"/i- test.csx", csi.
GenerateResponseFileContents
());
TestUtilities\TaskTestUtil.cs (1)
24
var rsp = task.
GenerateResponseFileContents
();
VbcTests.cs (61)
29
Assert.Equal("/optionstrict:custom /out:test.exe test.vb", vbc.
GenerateResponseFileContents
());
37
Assert.Equal("/optionstrict:custom /out:test1.exe test1.vb test2.vb", vbc.
GenerateResponseFileContents
());
46
Assert.Equal("/optionstrict:custom /pathmap:\"K1=V1,K2=V2\" /out:test.exe test.vb", vbc.
GenerateResponseFileContents
());
50
Assert.Equal("/optionstrict:custom /out:test.exe test.vb", vbc.
GenerateResponseFileContents
());
59
Assert.Equal("/optionstrict:custom /out:test.exe /deterministic+ test.vb", vbc.
GenerateResponseFileContents
());
64
Assert.Equal("/optionstrict:custom /out:test.exe /deterministic- test.vb", vbc.
GenerateResponseFileContents
());
68
Assert.Equal("/optionstrict:custom /out:test.exe test.vb", vbc.
GenerateResponseFileContents
());
77
Assert.Equal("/optionstrict:custom /out:test.exe /publicsign+ test.vb", vbc.
GenerateResponseFileContents
());
82
Assert.Equal("/optionstrict:custom /out:test.exe /publicsign- test.vb", vbc.
GenerateResponseFileContents
());
86
Assert.Equal("/optionstrict:custom /out:test.exe test.vb", vbc.
GenerateResponseFileContents
());
95
Assert.Equal("/optionstrict:custom /out:test.exe /runtimemetadataversion:v1234 test.vb", vbc.
GenerateResponseFileContents
());
100
Assert.Equal("/optionstrict:custom /out:test.exe test.vb", vbc.
GenerateResponseFileContents
());
109
Assert.Equal("/optionstrict:custom /out:test.exe /langversion:15.3 test.vb", vbc.
GenerateResponseFileContents
());
118
Assert.Equal("/optionstrict:custom /out:test.exe /checksumalgorithm:sha256 test.vb", vbc.
GenerateResponseFileContents
());
123
Assert.Equal("/optionstrict:custom /out:test.exe test.vb", vbc.
GenerateResponseFileContents
());
128
Assert.Equal("/optionstrict:custom /out:test.exe /checksumalgorithm: test.vb", vbc.
GenerateResponseFileContents
());
136
Assert.Equal("/optionstrict:custom", vbc.
GenerateResponseFileContents
());
140
Assert.Equal("/optionstrict:custom /instrument:TestCoverage", vbc.
GenerateResponseFileContents
());
144
Assert.Equal("/optionstrict:custom /instrument:TestCoverage,Mumble", vbc.
GenerateResponseFileContents
());
148
Assert.Equal("/optionstrict:custom /instrument:TestCoverage,Mumble,Stumble", vbc.
GenerateResponseFileContents
());
157
Assert.Equal("/optionstrict:custom /out:test.dll /target:library test.vb", vbc.
GenerateResponseFileContents
());
166
Assert.Equal("/optionstrict:custom /out:test.exe /target:bad test.vb", vbc.
GenerateResponseFileContents
());
175
Assert.Equal("/optionstrict:custom /out:x.exe test.vb", vbc.
GenerateResponseFileContents
());
186
Assert.Equal($@"/optionstrict:custom /define:""{s}"" /out:test.exe test.vb", vbc.
GenerateResponseFileContents
());
202
Assert.Equal(@"/optionstrict:custom /out:test.exe /features:a /features:b test.vb", vbc.
GenerateResponseFileContents
());
221
Assert.Equal(@"/optionstrict:custom /out:test.exe test.vb", vbc.
GenerateResponseFileContents
());
231
Assert.Equal("/optionstrict:custom /debug:full /out:test.exe test.vb", vbc.
GenerateResponseFileContents
());
236
Assert.Equal("/optionstrict:custom /debug:pdbonly /out:test.exe test.vb", vbc.
GenerateResponseFileContents
());
241
Assert.Equal("/optionstrict:custom /debug:portable /out:test.exe test.vb", vbc.
GenerateResponseFileContents
());
246
Assert.Equal("/optionstrict:custom /debug:embedded /out:test.exe test.vb", vbc.
GenerateResponseFileContents
());
251
Assert.Equal("/optionstrict:custom /out:test.exe test.vb", vbc.
GenerateResponseFileContents
());
256
Assert.Equal("/optionstrict:custom /debug: /out:test.exe test.vb", vbc.
GenerateResponseFileContents
());
266
Assert.Equal(@"/optionstrict:custom /debug:portable /out:test.exe /sourcelink:""C:\x y\z.json"" test.vb", vbc.
GenerateResponseFileContents
());
272
Assert.Equal(@"/optionstrict:custom /debug:portable /out:test.exe test.vb", vbc.
GenerateResponseFileContents
());
278
Assert.Equal(@"/optionstrict:custom /debug:portable /out:test.exe /sourcelink: test.vb", vbc.
GenerateResponseFileContents
());
288
Assert.Equal(@"/optionstrict:custom /debug:portable /out:test.exe /embed:test.vb /embed:test.txt test.vb", vbc.
GenerateResponseFileContents
());
294
Assert.Equal(@"/optionstrict:custom /debug:portable /out:test.exe /embed:""C:\x y\z.json"" test.vb", vbc.
GenerateResponseFileContents
());
300
Assert.Equal(@"/optionstrict:custom /debug:portable /out:test.exe test.vb", vbc.
GenerateResponseFileContents
());
306
Assert.Equal(@"/optionstrict:custom /debug:full /out:test.exe test.vb", vbc.
GenerateResponseFileContents
());
312
Assert.Equal(@"/optionstrict:custom /debug:full /out:""a;b.exe"" /embed:""a;b.vb"" ""a;b.vb""", vbc.
GenerateResponseFileContents
());
318
Assert.Equal(@"/optionstrict:custom /debug:full /out:""a, b.exe"" /embed:""a, b.vb"" ""a, b.vb""", vbc.
GenerateResponseFileContents
());
329
Assert.Equal(@"/optionstrict:custom /out:test.exe /embed /embed:test.vb /embed:test.txt test.vb", vbc.
GenerateResponseFileContents
());
335
Assert.Equal(@"/optionstrict:custom /out:test.exe /embed test.vb", vbc.
GenerateResponseFileContents
());
344
Assert.Equal("/optionstrict:custom /out:test.exe /refout:ref\\test.dll test.vb", vbc.
GenerateResponseFileContents
());
353
Assert.Equal("/optionstrict:custom /out:test.exe /refonly test.vb", vbc.
GenerateResponseFileContents
());
363
Assert.Equal("/optionstrict:custom /out:test.exe test.vb", vbc.
GenerateResponseFileContents
());
369
Assert.Equal("/optionstrict:custom /out:test.exe test.vb", vbc.
GenerateResponseFileContents
());
374
Assert.Equal("/optionstrict:custom /out:test.exe test.vb", vbc.
GenerateResponseFileContents
());
385
Assert.Equal("/doc- /optionstrict:custom /out:test.exe test.vb", vbc.
GenerateResponseFileContents
());
396
Assert.Equal("/doc+ /optionstrict:custom /doc:test.xml /out:test.exe test.vb", vbc.
GenerateResponseFileContents
());
406
Assert.Equal("/doc+ /optionstrict:custom /out:test.exe test.vb", vbc.
GenerateResponseFileContents
());
416
Assert.Equal("/optionstrict:custom /doc:test.xml /out:test.exe test.vb", vbc.
GenerateResponseFileContents
());
425
Assert.Equal(@"/optionstrict:custom /sdkpath:path\to\sdk", vbc.
GenerateResponseFileContents
());
434
Assert.Equal(@"/optionstrict:custom /nosdkpath", vbc.
GenerateResponseFileContents
());
443
Assert.Equal(@"/optionstrict:custom /out:test.exe /analyzerconfig:.editorconfig test.vb", vbc.
GenerateResponseFileContents
());
448
Assert.Equal(@$"/optionstrict:custom /out:test.exe /analyzerconfig:.editorconfig /analyzerconfig:subdir\.editorconfig test.vb subdir{Path.DirectorySeparatorChar}test.vb", vbc.
GenerateResponseFileContents
());
453
Assert.Equal(@"/optionstrict:custom /out:test.exe /analyzerconfig:..\.editorconfig /analyzerconfig:""sub dir\.editorconfig"" test.vb", vbc.
GenerateResponseFileContents
());
463
Assert.Equal("/optionstrict:custom /out:test.exe /skipanalyzers+ test.vb", vbc.
GenerateResponseFileContents
());
468
Assert.Equal("/optionstrict:custom /out:test.exe /skipanalyzers- test.vb", vbc.
GenerateResponseFileContents
());
472
Assert.Equal("/optionstrict:custom /out:test.exe test.vb", vbc.
GenerateResponseFileContents
());
528
AssertEx.Equal("/optionstrict:custom /reportivts", vbc.
GenerateResponseFileContents
());