201 references to AppendSwitchIfNotNull
Microsoft.Build.Tasks.CodeAnalysis (57)
src\Compilers\Core\MSBuildTask\CommandLineBuilderExtension.cs (3)
104
AppendSwitchIfNotNull
(switchName, value.ToString(CultureInfo.InvariantCulture));
153
AppendSwitchIfNotNull
(outerSwitchName, innerSwitchName + quotedParameter);
248
AppendSwitchIfNotNull
(switchName, parameter.ItemSpec);
src\Compilers\Core\MSBuildTask\Csc.cs (15)
207
commandLine.
AppendSwitchIfNotNull
("/moduleassemblyname:", ModuleAssemblyName);
208
commandLine.
AppendSwitchIfNotNull
("/pdb:", PdbFile);
210
commandLine.
AppendSwitchIfNotNull
("/platform:", PlatformWith32BitPreference);
211
commandLine.
AppendSwitchIfNotNull
("/errorreport:", ErrorReport);
213
commandLine.
AppendSwitchIfNotNull
("/doc:", DocumentationFile);
214
commandLine.
AppendSwitchIfNotNull
("/baseaddress:", BaseAddress);
216
commandLine.
AppendSwitchIfNotNull
("/win32res:", Win32Resource);
217
commandLine.
AppendSwitchIfNotNull
("/main:", MainEntryPoint);
218
commandLine.
AppendSwitchIfNotNull
("/appconfig:", ApplicationConfiguration);
220
commandLine.
AppendSwitchIfNotNull
("/preferreduilang:", PreferredUILang);
222
commandLine.
AppendSwitchIfNotNull
("/nullable:", Nullable);
239
commandLine.
AppendSwitchIfNotNull
("/sqmsessionguid:", VsSessionGuid);
274
commandLine.
AppendSwitchIfNotNull
("@", response.ItemSpec);
295
commandLine.
AppendSwitchIfNotNull
("/features:", $"InterceptorsNamespaces={featureValue}");
426
commandLine.
AppendSwitchIfNotNull
(switchName, reference.ItemSpec);
src\Compilers\Core\MSBuildTask\InteractiveCompiler.cs (2)
212
commandLine.
AppendSwitchIfNotNull
("@", response.ItemSpec);
230
commandLine.
AppendSwitchIfNotNull
("@", scriptResponse.ItemSpec);
src\Compilers\Core\MSBuildTask\ManagedCompiler.cs (20)
881
commandLine.
AppendSwitchIfNotNull
("/debug:", DebugType);
888
commandLine.
AppendSwitchIfNotNull
("/generatedfilesout:", GeneratedFilesOutputPath);
889
commandLine.
AppendSwitchIfNotNull
("/keycontainer:", KeyContainer);
890
commandLine.
AppendSwitchIfNotNull
("/keyfile:", KeyFile);
896
commandLine.
AppendSwitchIfNotNull
("/pathmap:", PathMap);
900
commandLine.
AppendSwitchIfNotNull
("/ruleset:", CodeAnalysisRuleSet);
901
commandLine.
AppendSwitchIfNotNull
("/errorlog:", ErrorLog);
902
commandLine.
AppendSwitchIfNotNull
("/subsystemversion:", SubsystemVersion);
906
commandLine.
AppendSwitchIfNotNull
("/target:", TargetType);
909
commandLine.
AppendSwitchIfNotNull
("/win32icon:", Win32Icon);
910
commandLine.
AppendSwitchIfNotNull
("/win32manifest:", Win32Manifest);
924
commandLine.
AppendSwitchIfNotNull
("/runtimemetadataversion:", RuntimeMetadataVersion);
925
commandLine.
AppendSwitchIfNotNull
("/checksumalgorithm:", ChecksumAlgorithm);
927
commandLine.
AppendSwitchIfNotNull
("/sourcelink:", SourceLink);
928
commandLine.
AppendSwitchIfNotNull
("/langversion:", LangVersion);
948
commandLine.
AppendSwitchIfNotNull
("/features:", feature.Trim());
966
commandLine.
AppendSwitchIfNotNull
("/analyzer:", analyzer.ItemSpec);
979
commandLine.
AppendSwitchIfNotNull
("/additionalfile:", additionalFile.ItemSpec);
998
commandLine.
AppendSwitchIfNotNull
("/embed:", embeddedFile.ItemSpec);
1012
commandLine.
AppendSwitchIfNotNull
("/analyzerconfig:", analyzerConfigFile.ItemSpec);
src\Compilers\Core\MSBuildTask\Vbc.cs (17)
387
commandLine.
AppendSwitchIfNotNull
("/baseaddress:", this.GetBaseAddressInHex());
395
commandLine.
AppendSwitchIfNotNull
("/optioncompare:", this.OptionCompare);
429
commandLine.
AppendSwitchIfNotNull
("/optionstrict:", this.OptionStrictType);
436
commandLine.
AppendSwitchIfNotNull
("/errorreport:", this.ErrorReport);
437
commandLine.
AppendSwitchIfNotNull
("/platform:", this.PlatformWith32BitPreference);
439
commandLine.
AppendSwitchIfNotNull
("/rootnamespace:", this.RootNamespace);
440
commandLine.
AppendSwitchIfNotNull
("/sdkpath:", this.SdkPath);
441
commandLine.
AppendSwitchIfNotNull
("/moduleassemblyname:", this.ModuleAssemblyName);
443
commandLine.
AppendSwitchIfNotNull
("/preferreduilang:", this.PreferredUILang);
448
commandLine.
AppendSwitchIfNotNull
("/vbruntime:", this.VBRuntimePath);
467
commandLine.
AppendSwitchIfNotNull
("/vbruntime:", vbRuntimeSwitch);
481
commandLine.
AppendSwitchIfNotNull
("/", this.Verbosity);
490
commandLine.
AppendSwitchIfNotNull
("/doc:", this.DocumentationFile);
495
commandLine.
AppendSwitchIfNotNull
("/win32resource:", this.Win32Resource);
500
commandLine.
AppendSwitchIfNotNull
("/main:", this.MainEntryPoint);
537
commandLine.
AppendSwitchIfNotNull
("/sqmsessionguid:", this.VsSessionGuid);
549
commandLine.
AppendSwitchIfNotNull
("@", response.ItemSpec);
Microsoft.Build.Tasks.CodeAnalysis.Sdk (57)
src\Compilers\Core\MSBuildTask\CommandLineBuilderExtension.cs (3)
104
AppendSwitchIfNotNull
(switchName, value.ToString(CultureInfo.InvariantCulture));
153
AppendSwitchIfNotNull
(outerSwitchName, innerSwitchName + quotedParameter);
248
AppendSwitchIfNotNull
(switchName, parameter.ItemSpec);
src\Compilers\Core\MSBuildTask\Csc.cs (15)
207
commandLine.
AppendSwitchIfNotNull
("/moduleassemblyname:", ModuleAssemblyName);
208
commandLine.
AppendSwitchIfNotNull
("/pdb:", PdbFile);
210
commandLine.
AppendSwitchIfNotNull
("/platform:", PlatformWith32BitPreference);
211
commandLine.
AppendSwitchIfNotNull
("/errorreport:", ErrorReport);
213
commandLine.
AppendSwitchIfNotNull
("/doc:", DocumentationFile);
214
commandLine.
AppendSwitchIfNotNull
("/baseaddress:", BaseAddress);
216
commandLine.
AppendSwitchIfNotNull
("/win32res:", Win32Resource);
217
commandLine.
AppendSwitchIfNotNull
("/main:", MainEntryPoint);
218
commandLine.
AppendSwitchIfNotNull
("/appconfig:", ApplicationConfiguration);
220
commandLine.
AppendSwitchIfNotNull
("/preferreduilang:", PreferredUILang);
222
commandLine.
AppendSwitchIfNotNull
("/nullable:", Nullable);
239
commandLine.
AppendSwitchIfNotNull
("/sqmsessionguid:", VsSessionGuid);
274
commandLine.
AppendSwitchIfNotNull
("@", response.ItemSpec);
295
commandLine.
AppendSwitchIfNotNull
("/features:", $"InterceptorsNamespaces={featureValue}");
426
commandLine.
AppendSwitchIfNotNull
(switchName, reference.ItemSpec);
src\Compilers\Core\MSBuildTask\InteractiveCompiler.cs (2)
212
commandLine.
AppendSwitchIfNotNull
("@", response.ItemSpec);
230
commandLine.
AppendSwitchIfNotNull
("@", scriptResponse.ItemSpec);
src\Compilers\Core\MSBuildTask\ManagedCompiler.cs (20)
881
commandLine.
AppendSwitchIfNotNull
("/debug:", DebugType);
888
commandLine.
AppendSwitchIfNotNull
("/generatedfilesout:", GeneratedFilesOutputPath);
889
commandLine.
AppendSwitchIfNotNull
("/keycontainer:", KeyContainer);
890
commandLine.
AppendSwitchIfNotNull
("/keyfile:", KeyFile);
896
commandLine.
AppendSwitchIfNotNull
("/pathmap:", PathMap);
900
commandLine.
AppendSwitchIfNotNull
("/ruleset:", CodeAnalysisRuleSet);
901
commandLine.
AppendSwitchIfNotNull
("/errorlog:", ErrorLog);
902
commandLine.
AppendSwitchIfNotNull
("/subsystemversion:", SubsystemVersion);
906
commandLine.
AppendSwitchIfNotNull
("/target:", TargetType);
909
commandLine.
AppendSwitchIfNotNull
("/win32icon:", Win32Icon);
910
commandLine.
AppendSwitchIfNotNull
("/win32manifest:", Win32Manifest);
924
commandLine.
AppendSwitchIfNotNull
("/runtimemetadataversion:", RuntimeMetadataVersion);
925
commandLine.
AppendSwitchIfNotNull
("/checksumalgorithm:", ChecksumAlgorithm);
927
commandLine.
AppendSwitchIfNotNull
("/sourcelink:", SourceLink);
928
commandLine.
AppendSwitchIfNotNull
("/langversion:", LangVersion);
948
commandLine.
AppendSwitchIfNotNull
("/features:", feature.Trim());
966
commandLine.
AppendSwitchIfNotNull
("/analyzer:", analyzer.ItemSpec);
979
commandLine.
AppendSwitchIfNotNull
("/additionalfile:", additionalFile.ItemSpec);
998
commandLine.
AppendSwitchIfNotNull
("/embed:", embeddedFile.ItemSpec);
1012
commandLine.
AppendSwitchIfNotNull
("/analyzerconfig:", analyzerConfigFile.ItemSpec);
src\Compilers\Core\MSBuildTask\Vbc.cs (17)
387
commandLine.
AppendSwitchIfNotNull
("/baseaddress:", this.GetBaseAddressInHex());
395
commandLine.
AppendSwitchIfNotNull
("/optioncompare:", this.OptionCompare);
429
commandLine.
AppendSwitchIfNotNull
("/optionstrict:", this.OptionStrictType);
436
commandLine.
AppendSwitchIfNotNull
("/errorreport:", this.ErrorReport);
437
commandLine.
AppendSwitchIfNotNull
("/platform:", this.PlatformWith32BitPreference);
439
commandLine.
AppendSwitchIfNotNull
("/rootnamespace:", this.RootNamespace);
440
commandLine.
AppendSwitchIfNotNull
("/sdkpath:", this.SdkPath);
441
commandLine.
AppendSwitchIfNotNull
("/moduleassemblyname:", this.ModuleAssemblyName);
443
commandLine.
AppendSwitchIfNotNull
("/preferreduilang:", this.PreferredUILang);
448
commandLine.
AppendSwitchIfNotNull
("/vbruntime:", this.VBRuntimePath);
467
commandLine.
AppendSwitchIfNotNull
("/vbruntime:", vbRuntimeSwitch);
481
commandLine.
AppendSwitchIfNotNull
("/", this.Verbosity);
490
commandLine.
AppendSwitchIfNotNull
("/doc:", this.DocumentationFile);
495
commandLine.
AppendSwitchIfNotNull
("/win32resource:", this.Win32Resource);
500
commandLine.
AppendSwitchIfNotNull
("/main:", this.MainEntryPoint);
537
commandLine.
AppendSwitchIfNotNull
("/sqmsessionguid:", this.VsSessionGuid);
549
commandLine.
AppendSwitchIfNotNull
("@", response.ItemSpec);
Microsoft.Build.Tasks.Core (57)
Al.cs (25)
332
commandLine.
AppendSwitchIfNotNull
("/algid:", AlgorithmId);
333
commandLine.
AppendSwitchIfNotNull
("/baseaddress:", BaseAddress);
334
commandLine.
AppendSwitchIfNotNull
("/company:", CompanyName);
335
commandLine.
AppendSwitchIfNotNull
("/configuration:", Configuration);
336
commandLine.
AppendSwitchIfNotNull
("/copyright:", Copyright);
337
commandLine.
AppendSwitchIfNotNull
("/culture:", Culture);
339
commandLine.
AppendSwitchIfNotNull
("/description:", Description);
340
commandLine.
AppendSwitchIfNotNull
("/evidence:", EvidenceFile);
341
commandLine.
AppendSwitchIfNotNull
("/fileversion:", FileVersion);
342
commandLine.
AppendSwitchIfNotNull
("/flags:", Flags);
344
commandLine.
AppendSwitchIfNotNull
("/keyfile:", KeyFile);
345
commandLine.
AppendSwitchIfNotNull
("/keyname:", KeyContainer);
346
commandLine.
AppendSwitchIfNotNull
("/main:", MainEntryPoint);
347
commandLine.
AppendSwitchIfNotNull
("/out:", OutputAssembly?.ItemSpec);
348
commandLine.
AppendSwitchIfNotNull
("/platform:", PlatformWith32BitPreference);
349
commandLine.
AppendSwitchIfNotNull
("/product:", ProductName);
350
commandLine.
AppendSwitchIfNotNull
("/productversion:", ProductVersion);
351
commandLine.
AppendSwitchIfNotNull
("/target:", TargetType);
352
commandLine.
AppendSwitchIfNotNull
("/template:", TemplateFile);
353
commandLine.
AppendSwitchIfNotNull
("/title:", Title);
354
commandLine.
AppendSwitchIfNotNull
("/trademark:", Trademark);
355
commandLine.
AppendSwitchIfNotNull
("/version:", Version);
356
commandLine.
AppendSwitchIfNotNull
("/win32icon:", Win32Icon);
357
commandLine.
AppendSwitchIfNotNull
("/win32res:", Win32Resource);
378
commandLine.
AppendSwitchIfNotNull
("@", responseFile);
AspNetCompiler.cs (6)
249
commandLine.
AppendSwitchIfNotNull
("-m ", MetabasePath);
250
commandLine.
AppendSwitchIfNotNull
("-v ", VirtualPath);
251
commandLine.
AppendSwitchIfNotNull
("-p ", PhysicalPath);
278
commandLine.
AppendSwitchIfNotNull
("", TargetPath);
290
commandLine.
AppendSwitchIfNotNull
("-keyfile ", KeyFile);
291
commandLine.
AppendSwitchIfNotNull
("-keycontainer ", KeyContainer);
AxImp.cs (2)
132
commandLine.
AppendSwitchIfNotNull
("/out:", OutputAssembly);
133
commandLine.
AppendSwitchIfNotNull
("/rcw:", RuntimeCallableWrapperAssembly);
AxTlbBaseTask.cs (3)
160
commandLine.
AppendSwitchIfNotNull
("/publickey:", KeyFile);
164
commandLine.
AppendSwitchIfNotNull
("/keyfile:", KeyFile);
167
commandLine.
AppendSwitchIfNotNull
("/keycontainer:", KeyContainer);
CommandLineBuilderExtension.cs (3)
121
AppendSwitchIfNotNull
(switchName, value.ToString(CultureInfo.InvariantCulture));
145
AppendSwitchIfNotNull
(outerSwitchName, innerSwitchName + quotedParameter);
245
AppendSwitchIfNotNull
(switchName, parameter.ItemSpec);
LC.cs (4)
146
commandLine.
AppendSwitchIfNotNull
("/target:", LicenseTarget.ItemSpec);
150
commandLine.
AppendSwitchIfNotNull
("/complist:", item.ItemSpec);
153
commandLine.
AppendSwitchIfNotNull
("/outdir:", OutputDirectory);
159
commandLine.
AppendSwitchIfNotNull
("/i:", item.ItemSpec);
RoslynCodeTaskFactory\RoslynCodeTaskFactoryCompilers.cs (3)
106
commandLine.
AppendSwitchIfNotNull
(ReferenceSwitch, reference.ItemSpec);
113
commandLine.
AppendSwitchIfNotNull
("/target:", TargetType);
164
commandLine.
AppendSwitchIfNotNull
("/rootnamespace:", RootNamespace);
SGen.cs (3)
372
commandLineBuilder.
AppendSwitchIfNotNull
("/assembly:", AssemblyFullPath);
388
commandLineBuilder.
AppendSwitchIfNotNull
("/reference:", string.Join(",", References));
397
commandLineBuilder.
AppendSwitchIfNotNull
("/type:", type);
TlbImp.cs (6)
242
commandLine.
AppendSwitchIfNotNull
("/asmversion:", AssemblyVersion?.ToString());
243
commandLine.
AppendSwitchIfNotNull
("/namespace:", AssemblyNamespace);
244
commandLine.
AppendSwitchIfNotNull
("/machine:", Machine);
247
commandLine.
AppendSwitchIfNotNull
("/out:", OutputAssembly);
250
commandLine.
AppendSwitchIfNotNull
("/transform:", ConvertTransformFlagsToCommandLineCommand(Transform));
256
commandLine.
AppendSwitchIfNotNull
("/reference:", referenceFile);
XamlTaskFactory\CommandLineGenerator.cs (2)
354
clb.
AppendSwitchIfNotNull
(commandLineToolSwitch.SwitchValue, itemName.ItemSpec);
403
clb.
AppendSwitchIfNotNull
(commandLineToolSwitch.SwitchValue, fileName);
Microsoft.Build.Tasks.UnitTests (2)
ToolTaskExtension_Tests.cs (2)
108
commandLineBuilder.
AppendSwitchIfNotNull
("/A:", "D66B977148114482A88B0EFC1E531F02");
109
commandLineBuilder.
AppendSwitchIfNotNull
("/B:", "F9E03765A87543F4B385664B8DB7619D");
Microsoft.Build.Utilities.Core (5)
CommandLineBuilder.cs (1)
556
AppendSwitchIfNotNull
(switchName, parameter.ItemSpec);
TrackedDependencies\FileTracker.cs (4)
612
builder.
AppendSwitchIfNotNull
("/d ", dllName);
622
builder.
AppendSwitchIfNotNull
("/i ", intermediateDirectory);
625
builder.
AppendSwitchIfNotNull
("/r ", rootFiles);
627
builder.
AppendSwitchIfNotNull
("/b ", cancelEventName); // b for break
Microsoft.Build.Utilities.UnitTests (14)
CommandLineBuilder_Tests.cs (14)
42
c.
AppendSwitchIfNotNull
("/animal:", "dog");
55
c.
AppendSwitchIfNotNull
("/animal:", "dog and pony");
68
c.
AppendSwitchIfNotNull
("/i:", "iI");
300
c.
AppendSwitchIfNotNull
("/D", "LSYSTEM_COMPATIBLE_ASSEMBLY_NAME=L\"Microsoft.Windows.SystemCompatible\"");
311
c.
AppendSwitchIfNotNull
("/D", @"ASSEMBLY_KEY_FILE=""c:\\foo\\FinalKeyFile.snk""");
322
c.
AppendSwitchIfNotNull
("/D", @"""A B"" and ""C""");
333
c.
AppendSwitchIfNotNull
("/D", @"A \B");
344
c.
AppendSwitchIfNotNull
("/D", @"A"" \""B");
367
c.
AppendSwitchIfNotNull
("/D", @"A B\");
378
c.
AppendSwitchIfNotNull
("/D", @"AB\");
389
c.
AppendSwitchIfNotNull
("/D", @"foo-bar");
400
c.
AppendSwitchIfNotNull
("/D", @"foo-bar");
436
c.
AppendSwitchIfNotNull
("/D", @"A='""'"); // /DA='"'
445
c.
AppendSwitchIfNotNull
("/foo:", "bar");
Microsoft.DotNet.Build.Tasks.Workloads (9)
Wix\CommandLineBuilderExtensions.cs (1)
25
builder.
AppendSwitchIfNotNull
(switchName, value);
Wix\CompilerToolTask.cs (2)
74
CommandLineBuilder.
AppendSwitchIfNotNull
("-out ", OutputPath);
78
CommandLineBuilder.
AppendSwitchIfNotNull
("-arch ", Architecture);
Wix\HarvesterToolTask.cs (4)
110
CommandLineBuilder.
AppendSwitchIfNotNull
("dir ", SourceDirectory);
112
CommandLineBuilder.
AppendSwitchIfNotNull
("-cg ", ComponentGroupName);
136
CommandLineBuilder.
AppendSwitchIfNotNull
("-dr ", DirectoryReference);
137
CommandLineBuilder.
AppendSwitchIfNotNull
("-o ", OutputFile);
Wix\LinkerToolTask.cs (2)
76
CommandLineBuilder.
AppendSwitchIfNotNull
("-o ", OutputFile);
79
CommandLineBuilder.
AppendSwitchIfNotNull
("-sice:", SuppressIces);