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