206 references to AppendSwitchIfNotNull
Microsoft.Build.Tasks.CodeAnalysis (61)
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 (17)
207
commandLine.
AppendSwitchIfNotNull
("/sdkpath:", RuntimeEnvironment.GetRuntimeDirectory());
214
commandLine.
AppendSwitchIfNotNull
("@", rspFile);
224
commandLine.
AppendSwitchIfNotNull
("/moduleassemblyname:", ModuleAssemblyName);
225
commandLine.
AppendSwitchIfNotNull
("/pdb:", PdbFile);
227
commandLine.
AppendSwitchIfNotNull
("/platform:", PlatformWith32BitPreference);
228
commandLine.
AppendSwitchIfNotNull
("/errorreport:", ErrorReport);
230
commandLine.
AppendSwitchIfNotNull
("/doc:", DocumentationFile);
231
commandLine.
AppendSwitchIfNotNull
("/baseaddress:", BaseAddress);
233
commandLine.
AppendSwitchIfNotNull
("/win32res:", Win32Resource);
234
commandLine.
AppendSwitchIfNotNull
("/main:", MainEntryPoint);
235
commandLine.
AppendSwitchIfNotNull
("/appconfig:", ApplicationConfiguration);
237
commandLine.
AppendSwitchIfNotNull
("/preferreduilang:", PreferredUILang);
239
commandLine.
AppendSwitchIfNotNull
("/nullable:", Nullable);
256
commandLine.
AppendSwitchIfNotNull
("/sqmsessionguid:", VsSessionGuid);
291
commandLine.
AppendSwitchIfNotNull
("@", response.ItemSpec);
312
commandLine.
AppendSwitchIfNotNull
("/features:", $"InterceptorsNamespaces={featureValue}");
443
commandLine.
AppendSwitchIfNotNull
(switchName, reference.ItemSpec);
src\Compilers\Core\MSBuildTask\InteractiveCompiler.cs (2)
210
commandLine.
AppendSwitchIfNotNull
("@", response.ItemSpec);
228
commandLine.
AppendSwitchIfNotNull
("@", scriptResponse.ItemSpec);
src\Compilers\Core\MSBuildTask\ManagedCompiler.cs (20)
883
commandLine.
AppendSwitchIfNotNull
("/debug:", DebugType);
890
commandLine.
AppendSwitchIfNotNull
("/generatedfilesout:", GeneratedFilesOutputPath);
891
commandLine.
AppendSwitchIfNotNull
("/keycontainer:", KeyContainer);
892
commandLine.
AppendSwitchIfNotNull
("/keyfile:", KeyFile);
898
commandLine.
AppendSwitchIfNotNull
("/pathmap:", PathMap);
902
commandLine.
AppendSwitchIfNotNull
("/ruleset:", CodeAnalysisRuleSet);
903
commandLine.
AppendSwitchIfNotNull
("/errorlog:", ErrorLog);
904
commandLine.
AppendSwitchIfNotNull
("/subsystemversion:", SubsystemVersion);
908
commandLine.
AppendSwitchIfNotNull
("/target:", TargetType);
911
commandLine.
AppendSwitchIfNotNull
("/win32icon:", Win32Icon);
912
commandLine.
AppendSwitchIfNotNull
("/win32manifest:", Win32Manifest);
936
commandLine.
AppendSwitchIfNotNull
("/runtimemetadataversion:", RuntimeMetadataVersion);
937
commandLine.
AppendSwitchIfNotNull
("/checksumalgorithm:", ChecksumAlgorithm);
939
commandLine.
AppendSwitchIfNotNull
("/sourcelink:", SourceLink);
940
commandLine.
AppendSwitchIfNotNull
("/langversion:", LangVersion);
960
commandLine.
AppendSwitchIfNotNull
("/features:", feature.Trim());
978
commandLine.
AppendSwitchIfNotNull
("/analyzer:", analyzer.ItemSpec);
991
commandLine.
AppendSwitchIfNotNull
("/additionalfile:", additionalFile.ItemSpec);
1010
commandLine.
AppendSwitchIfNotNull
("/embed:", embeddedFile.ItemSpec);
1024
commandLine.
AppendSwitchIfNotNull
("/analyzerconfig:", analyzerConfigFile.ItemSpec);
src\Compilers\Core\MSBuildTask\Vbc.cs (19)
391
commandLine.
AppendSwitchIfNotNull
("/sdkpath:", RuntimeEnvironment.GetRuntimeDirectory());
398
commandLine.
AppendSwitchIfNotNull
("@", rspFile);
403
commandLine.
AppendSwitchIfNotNull
("/baseaddress:", this.GetBaseAddressInHex());
411
commandLine.
AppendSwitchIfNotNull
("/optioncompare:", this.OptionCompare);
445
commandLine.
AppendSwitchIfNotNull
("/optionstrict:", this.OptionStrictType);
452
commandLine.
AppendSwitchIfNotNull
("/errorreport:", this.ErrorReport);
453
commandLine.
AppendSwitchIfNotNull
("/platform:", this.PlatformWith32BitPreference);
455
commandLine.
AppendSwitchIfNotNull
("/rootnamespace:", this.RootNamespace);
456
commandLine.
AppendSwitchIfNotNull
("/sdkpath:", this.SdkPath);
457
commandLine.
AppendSwitchIfNotNull
("/moduleassemblyname:", this.ModuleAssemblyName);
459
commandLine.
AppendSwitchIfNotNull
("/preferreduilang:", this.PreferredUILang);
464
commandLine.
AppendSwitchIfNotNull
("/vbruntime:", this.VBRuntimePath);
483
commandLine.
AppendSwitchIfNotNull
("/vbruntime:", vbRuntimeSwitch);
497
commandLine.
AppendSwitchIfNotNull
("/", this.Verbosity);
506
commandLine.
AppendSwitchIfNotNull
("/doc:", this.DocumentationFile);
511
commandLine.
AppendSwitchIfNotNull
("/win32resource:", this.Win32Resource);
516
commandLine.
AppendSwitchIfNotNull
("/main:", this.MainEntryPoint);
553
commandLine.
AppendSwitchIfNotNull
("/sqmsessionguid:", this.VsSessionGuid);
565
commandLine.
AppendSwitchIfNotNull
("@", response.ItemSpec);
Microsoft.Build.Tasks.CodeAnalysis.Sdk (61)
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 (17)
207
commandLine.
AppendSwitchIfNotNull
("/sdkpath:", RuntimeEnvironment.GetRuntimeDirectory());
214
commandLine.
AppendSwitchIfNotNull
("@", rspFile);
224
commandLine.
AppendSwitchIfNotNull
("/moduleassemblyname:", ModuleAssemblyName);
225
commandLine.
AppendSwitchIfNotNull
("/pdb:", PdbFile);
227
commandLine.
AppendSwitchIfNotNull
("/platform:", PlatformWith32BitPreference);
228
commandLine.
AppendSwitchIfNotNull
("/errorreport:", ErrorReport);
230
commandLine.
AppendSwitchIfNotNull
("/doc:", DocumentationFile);
231
commandLine.
AppendSwitchIfNotNull
("/baseaddress:", BaseAddress);
233
commandLine.
AppendSwitchIfNotNull
("/win32res:", Win32Resource);
234
commandLine.
AppendSwitchIfNotNull
("/main:", MainEntryPoint);
235
commandLine.
AppendSwitchIfNotNull
("/appconfig:", ApplicationConfiguration);
237
commandLine.
AppendSwitchIfNotNull
("/preferreduilang:", PreferredUILang);
239
commandLine.
AppendSwitchIfNotNull
("/nullable:", Nullable);
256
commandLine.
AppendSwitchIfNotNull
("/sqmsessionguid:", VsSessionGuid);
291
commandLine.
AppendSwitchIfNotNull
("@", response.ItemSpec);
312
commandLine.
AppendSwitchIfNotNull
("/features:", $"InterceptorsNamespaces={featureValue}");
443
commandLine.
AppendSwitchIfNotNull
(switchName, reference.ItemSpec);
src\Compilers\Core\MSBuildTask\InteractiveCompiler.cs (2)
210
commandLine.
AppendSwitchIfNotNull
("@", response.ItemSpec);
228
commandLine.
AppendSwitchIfNotNull
("@", scriptResponse.ItemSpec);
src\Compilers\Core\MSBuildTask\ManagedCompiler.cs (20)
883
commandLine.
AppendSwitchIfNotNull
("/debug:", DebugType);
890
commandLine.
AppendSwitchIfNotNull
("/generatedfilesout:", GeneratedFilesOutputPath);
891
commandLine.
AppendSwitchIfNotNull
("/keycontainer:", KeyContainer);
892
commandLine.
AppendSwitchIfNotNull
("/keyfile:", KeyFile);
898
commandLine.
AppendSwitchIfNotNull
("/pathmap:", PathMap);
902
commandLine.
AppendSwitchIfNotNull
("/ruleset:", CodeAnalysisRuleSet);
903
commandLine.
AppendSwitchIfNotNull
("/errorlog:", ErrorLog);
904
commandLine.
AppendSwitchIfNotNull
("/subsystemversion:", SubsystemVersion);
908
commandLine.
AppendSwitchIfNotNull
("/target:", TargetType);
911
commandLine.
AppendSwitchIfNotNull
("/win32icon:", Win32Icon);
912
commandLine.
AppendSwitchIfNotNull
("/win32manifest:", Win32Manifest);
936
commandLine.
AppendSwitchIfNotNull
("/runtimemetadataversion:", RuntimeMetadataVersion);
937
commandLine.
AppendSwitchIfNotNull
("/checksumalgorithm:", ChecksumAlgorithm);
939
commandLine.
AppendSwitchIfNotNull
("/sourcelink:", SourceLink);
940
commandLine.
AppendSwitchIfNotNull
("/langversion:", LangVersion);
960
commandLine.
AppendSwitchIfNotNull
("/features:", feature.Trim());
978
commandLine.
AppendSwitchIfNotNull
("/analyzer:", analyzer.ItemSpec);
991
commandLine.
AppendSwitchIfNotNull
("/additionalfile:", additionalFile.ItemSpec);
1010
commandLine.
AppendSwitchIfNotNull
("/embed:", embeddedFile.ItemSpec);
1024
commandLine.
AppendSwitchIfNotNull
("/analyzerconfig:", analyzerConfigFile.ItemSpec);
src\Compilers\Core\MSBuildTask\Vbc.cs (19)
391
commandLine.
AppendSwitchIfNotNull
("/sdkpath:", RuntimeEnvironment.GetRuntimeDirectory());
398
commandLine.
AppendSwitchIfNotNull
("@", rspFile);
403
commandLine.
AppendSwitchIfNotNull
("/baseaddress:", this.GetBaseAddressInHex());
411
commandLine.
AppendSwitchIfNotNull
("/optioncompare:", this.OptionCompare);
445
commandLine.
AppendSwitchIfNotNull
("/optionstrict:", this.OptionStrictType);
452
commandLine.
AppendSwitchIfNotNull
("/errorreport:", this.ErrorReport);
453
commandLine.
AppendSwitchIfNotNull
("/platform:", this.PlatformWith32BitPreference);
455
commandLine.
AppendSwitchIfNotNull
("/rootnamespace:", this.RootNamespace);
456
commandLine.
AppendSwitchIfNotNull
("/sdkpath:", this.SdkPath);
457
commandLine.
AppendSwitchIfNotNull
("/moduleassemblyname:", this.ModuleAssemblyName);
459
commandLine.
AppendSwitchIfNotNull
("/preferreduilang:", this.PreferredUILang);
464
commandLine.
AppendSwitchIfNotNull
("/vbruntime:", this.VBRuntimePath);
483
commandLine.
AppendSwitchIfNotNull
("/vbruntime:", vbRuntimeSwitch);
497
commandLine.
AppendSwitchIfNotNull
("/", this.Verbosity);
506
commandLine.
AppendSwitchIfNotNull
("/doc:", this.DocumentationFile);
511
commandLine.
AppendSwitchIfNotNull
("/win32resource:", this.Win32Resource);
516
commandLine.
AppendSwitchIfNotNull
("/main:", this.MainEntryPoint);
553
commandLine.
AppendSwitchIfNotNull
("/sqmsessionguid:", this.VsSessionGuid);
565
commandLine.
AppendSwitchIfNotNull
("@", response.ItemSpec);
Microsoft.Build.Tasks.Core (58)
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 (4)
109
commandLine.
AppendSwitchIfNotNull
(ReferenceSwitch, reference.ItemSpec);
116
commandLine.
AppendSwitchIfNotNull
("/nowarn:", NoWarn);
117
commandLine.
AppendSwitchIfNotNull
("/target:", TargetType);
168
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 (1)
CommandLineBuilder.cs (1)
556
AppendSwitchIfNotNull
(switchName, parameter.ItemSpec);
Microsoft.Build.Utilities.UnitTests (14)
CommandLineBuilder_Tests.cs (14)
43
c.
AppendSwitchIfNotNull
("/animal:", "dog");
56
c.
AppendSwitchIfNotNull
("/animal:", "dog and pony");
69
c.
AppendSwitchIfNotNull
("/i:", "iI");
301
c.
AppendSwitchIfNotNull
("/D", "LSYSTEM_COMPATIBLE_ASSEMBLY_NAME=L\"Microsoft.Windows.SystemCompatible\"");
312
c.
AppendSwitchIfNotNull
("/D", @"ASSEMBLY_KEY_FILE=""c:\\foo\\FinalKeyFile.snk""");
323
c.
AppendSwitchIfNotNull
("/D", @"""A B"" and ""C""");
334
c.
AppendSwitchIfNotNull
("/D", @"A \B");
345
c.
AppendSwitchIfNotNull
("/D", @"A"" \""B");
368
c.
AppendSwitchIfNotNull
("/D", @"A B\");
379
c.
AppendSwitchIfNotNull
("/D", @"AB\");
390
c.
AppendSwitchIfNotNull
("/D", @"foo-bar");
401
c.
AppendSwitchIfNotNull
("/D", @"foo-bar");
437
c.
AppendSwitchIfNotNull
("/D", @"A='""'"); // /DA='"'
446
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);