176 references to AppendSwitchIfNotNull
Microsoft.Build.Tasks.CodeAnalysis (59)
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 (16)
206
commandLine.
AppendSwitchIfNotNull
("/sdkpath:", RuntimeEnvironment.GetRuntimeDirectory());
214
commandLine.
AppendSwitchIfNotNull
("/moduleassemblyname:", ModuleAssemblyName);
215
commandLine.
AppendSwitchIfNotNull
("/pdb:", PdbFile);
217
commandLine.
AppendSwitchIfNotNull
("/platform:", PlatformWith32BitPreference);
218
commandLine.
AppendSwitchIfNotNull
("/errorreport:", ErrorReport);
220
commandLine.
AppendSwitchIfNotNull
("/doc:", DocumentationFile);
221
commandLine.
AppendSwitchIfNotNull
("/baseaddress:", BaseAddress);
223
commandLine.
AppendSwitchIfNotNull
("/win32res:", Win32Resource);
224
commandLine.
AppendSwitchIfNotNull
("/main:", MainEntryPoint);
225
commandLine.
AppendSwitchIfNotNull
("/appconfig:", ApplicationConfiguration);
227
commandLine.
AppendSwitchIfNotNull
("/preferreduilang:", PreferredUILang);
229
commandLine.
AppendSwitchIfNotNull
("/nullable:", Nullable);
246
commandLine.
AppendSwitchIfNotNull
("/sqmsessionguid:", VsSessionGuid);
281
commandLine.
AppendSwitchIfNotNull
("@", response.ItemSpec);
302
commandLine.
AppendSwitchIfNotNull
("/features:", $"InterceptorsNamespaces={featureValue}");
433
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)
880
commandLine.
AppendSwitchIfNotNull
("/debug:", DebugType);
887
commandLine.
AppendSwitchIfNotNull
("/generatedfilesout:", GeneratedFilesOutputPath);
888
commandLine.
AppendSwitchIfNotNull
("/keycontainer:", KeyContainer);
889
commandLine.
AppendSwitchIfNotNull
("/keyfile:", KeyFile);
895
commandLine.
AppendSwitchIfNotNull
("/pathmap:", PathMap);
899
commandLine.
AppendSwitchIfNotNull
("/ruleset:", CodeAnalysisRuleSet);
900
commandLine.
AppendSwitchIfNotNull
("/errorlog:", ErrorLog);
901
commandLine.
AppendSwitchIfNotNull
("/subsystemversion:", SubsystemVersion);
905
commandLine.
AppendSwitchIfNotNull
("/target:", TargetType);
908
commandLine.
AppendSwitchIfNotNull
("/win32icon:", Win32Icon);
909
commandLine.
AppendSwitchIfNotNull
("/win32manifest:", Win32Manifest);
923
commandLine.
AppendSwitchIfNotNull
("/runtimemetadataversion:", RuntimeMetadataVersion);
924
commandLine.
AppendSwitchIfNotNull
("/checksumalgorithm:", ChecksumAlgorithm);
926
commandLine.
AppendSwitchIfNotNull
("/sourcelink:", SourceLink);
927
commandLine.
AppendSwitchIfNotNull
("/langversion:", LangVersion);
947
commandLine.
AppendSwitchIfNotNull
("/features:", feature.Trim());
965
commandLine.
AppendSwitchIfNotNull
("/analyzer:", analyzer.ItemSpec);
978
commandLine.
AppendSwitchIfNotNull
("/additionalfile:", additionalFile.ItemSpec);
997
commandLine.
AppendSwitchIfNotNull
("/embed:", embeddedFile.ItemSpec);
1011
commandLine.
AppendSwitchIfNotNull
("/analyzerconfig:", analyzerConfigFile.ItemSpec);
src\Compilers\Core\MSBuildTask\Vbc.cs (18)
391
commandLine.
AppendSwitchIfNotNull
("/sdkpath:", RuntimeEnvironment.GetRuntimeDirectory());
394
commandLine.
AppendSwitchIfNotNull
("/baseaddress:", this.GetBaseAddressInHex());
402
commandLine.
AppendSwitchIfNotNull
("/optioncompare:", this.OptionCompare);
436
commandLine.
AppendSwitchIfNotNull
("/optionstrict:", this.OptionStrictType);
443
commandLine.
AppendSwitchIfNotNull
("/errorreport:", this.ErrorReport);
444
commandLine.
AppendSwitchIfNotNull
("/platform:", this.PlatformWith32BitPreference);
446
commandLine.
AppendSwitchIfNotNull
("/rootnamespace:", this.RootNamespace);
447
commandLine.
AppendSwitchIfNotNull
("/sdkpath:", this.SdkPath);
448
commandLine.
AppendSwitchIfNotNull
("/moduleassemblyname:", this.ModuleAssemblyName);
450
commandLine.
AppendSwitchIfNotNull
("/preferreduilang:", this.PreferredUILang);
455
commandLine.
AppendSwitchIfNotNull
("/vbruntime:", this.VBRuntimePath);
474
commandLine.
AppendSwitchIfNotNull
("/vbruntime:", vbRuntimeSwitch);
488
commandLine.
AppendSwitchIfNotNull
("/", this.Verbosity);
497
commandLine.
AppendSwitchIfNotNull
("/doc:", this.DocumentationFile);
502
commandLine.
AppendSwitchIfNotNull
("/win32resource:", this.Win32Resource);
507
commandLine.
AppendSwitchIfNotNull
("/main:", this.MainEntryPoint);
544
commandLine.
AppendSwitchIfNotNull
("/sqmsessionguid:", this.VsSessionGuid);
556
commandLine.
AppendSwitchIfNotNull
("@", response.ItemSpec);
Microsoft.Build.Tasks.CodeAnalysis.Sdk (59)
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 (16)
206
commandLine.
AppendSwitchIfNotNull
("/sdkpath:", RuntimeEnvironment.GetRuntimeDirectory());
214
commandLine.
AppendSwitchIfNotNull
("/moduleassemblyname:", ModuleAssemblyName);
215
commandLine.
AppendSwitchIfNotNull
("/pdb:", PdbFile);
217
commandLine.
AppendSwitchIfNotNull
("/platform:", PlatformWith32BitPreference);
218
commandLine.
AppendSwitchIfNotNull
("/errorreport:", ErrorReport);
220
commandLine.
AppendSwitchIfNotNull
("/doc:", DocumentationFile);
221
commandLine.
AppendSwitchIfNotNull
("/baseaddress:", BaseAddress);
223
commandLine.
AppendSwitchIfNotNull
("/win32res:", Win32Resource);
224
commandLine.
AppendSwitchIfNotNull
("/main:", MainEntryPoint);
225
commandLine.
AppendSwitchIfNotNull
("/appconfig:", ApplicationConfiguration);
227
commandLine.
AppendSwitchIfNotNull
("/preferreduilang:", PreferredUILang);
229
commandLine.
AppendSwitchIfNotNull
("/nullable:", Nullable);
246
commandLine.
AppendSwitchIfNotNull
("/sqmsessionguid:", VsSessionGuid);
281
commandLine.
AppendSwitchIfNotNull
("@", response.ItemSpec);
302
commandLine.
AppendSwitchIfNotNull
("/features:", $"InterceptorsNamespaces={featureValue}");
433
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)
880
commandLine.
AppendSwitchIfNotNull
("/debug:", DebugType);
887
commandLine.
AppendSwitchIfNotNull
("/generatedfilesout:", GeneratedFilesOutputPath);
888
commandLine.
AppendSwitchIfNotNull
("/keycontainer:", KeyContainer);
889
commandLine.
AppendSwitchIfNotNull
("/keyfile:", KeyFile);
895
commandLine.
AppendSwitchIfNotNull
("/pathmap:", PathMap);
899
commandLine.
AppendSwitchIfNotNull
("/ruleset:", CodeAnalysisRuleSet);
900
commandLine.
AppendSwitchIfNotNull
("/errorlog:", ErrorLog);
901
commandLine.
AppendSwitchIfNotNull
("/subsystemversion:", SubsystemVersion);
905
commandLine.
AppendSwitchIfNotNull
("/target:", TargetType);
908
commandLine.
AppendSwitchIfNotNull
("/win32icon:", Win32Icon);
909
commandLine.
AppendSwitchIfNotNull
("/win32manifest:", Win32Manifest);
923
commandLine.
AppendSwitchIfNotNull
("/runtimemetadataversion:", RuntimeMetadataVersion);
924
commandLine.
AppendSwitchIfNotNull
("/checksumalgorithm:", ChecksumAlgorithm);
926
commandLine.
AppendSwitchIfNotNull
("/sourcelink:", SourceLink);
927
commandLine.
AppendSwitchIfNotNull
("/langversion:", LangVersion);
947
commandLine.
AppendSwitchIfNotNull
("/features:", feature.Trim());
965
commandLine.
AppendSwitchIfNotNull
("/analyzer:", analyzer.ItemSpec);
978
commandLine.
AppendSwitchIfNotNull
("/additionalfile:", additionalFile.ItemSpec);
997
commandLine.
AppendSwitchIfNotNull
("/embed:", embeddedFile.ItemSpec);
1011
commandLine.
AppendSwitchIfNotNull
("/analyzerconfig:", analyzerConfigFile.ItemSpec);
src\Compilers\Core\MSBuildTask\Vbc.cs (18)
391
commandLine.
AppendSwitchIfNotNull
("/sdkpath:", RuntimeEnvironment.GetRuntimeDirectory());
394
commandLine.
AppendSwitchIfNotNull
("/baseaddress:", this.GetBaseAddressInHex());
402
commandLine.
AppendSwitchIfNotNull
("/optioncompare:", this.OptionCompare);
436
commandLine.
AppendSwitchIfNotNull
("/optionstrict:", this.OptionStrictType);
443
commandLine.
AppendSwitchIfNotNull
("/errorreport:", this.ErrorReport);
444
commandLine.
AppendSwitchIfNotNull
("/platform:", this.PlatformWith32BitPreference);
446
commandLine.
AppendSwitchIfNotNull
("/rootnamespace:", this.RootNamespace);
447
commandLine.
AppendSwitchIfNotNull
("/sdkpath:", this.SdkPath);
448
commandLine.
AppendSwitchIfNotNull
("/moduleassemblyname:", this.ModuleAssemblyName);
450
commandLine.
AppendSwitchIfNotNull
("/preferreduilang:", this.PreferredUILang);
455
commandLine.
AppendSwitchIfNotNull
("/vbruntime:", this.VBRuntimePath);
474
commandLine.
AppendSwitchIfNotNull
("/vbruntime:", vbRuntimeSwitch);
488
commandLine.
AppendSwitchIfNotNull
("/", this.Verbosity);
497
commandLine.
AppendSwitchIfNotNull
("/doc:", this.DocumentationFile);
502
commandLine.
AppendSwitchIfNotNull
("/win32resource:", this.Win32Resource);
507
commandLine.
AppendSwitchIfNotNull
("/main:", this.MainEntryPoint);
544
commandLine.
AppendSwitchIfNotNull
("/sqmsessionguid:", this.VsSessionGuid);
556
commandLine.
AppendSwitchIfNotNull
("@", response.ItemSpec);
Microsoft.Build.Tasks.Core (11)
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);
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);
Microsoft.NET.Build.Containers (14)
Tasks\CreateNewImageToolTask.cs (14)
120
builder.
AppendSwitchIfNotNull
("--baseregistry ", BaseRegistry);
121
builder.
AppendSwitchIfNotNull
("--baseimagename ", BaseImageName);
122
builder.
AppendSwitchIfNotNull
("--repository ", Repository);
123
builder.
AppendSwitchIfNotNull
("--workingdirectory ", WorkingDirectory);
128
builder.
AppendSwitchIfNotNull
("--baseimagetag ", BaseImageTag);
132
builder.
AppendSwitchIfNotNull
("--baseimagedigest ", BaseImageDigest);
136
builder.
AppendSwitchIfNotNull
("--outputregistry ", OutputRegistry);
140
builder.
AppendSwitchIfNotNull
("--localregistry ", LocalRegistry);
144
builder.
AppendSwitchIfNotNull
("--appcommandinstruction ", AppCommandInstruction);
148
builder.
AppendSwitchIfNotNull
("--image-format ", ImageFormat);
205
builder.
AppendSwitchIfNotNull
("--rid ", ContainerRuntimeIdentifier);
210
builder.
AppendSwitchIfNotNull
("--ridgraphpath ", RuntimeIdentifierGraphPath);
215
builder.
AppendSwitchIfNotNull
("--container-user ", ContainerUser);
220
builder.
AppendSwitchIfNotNull
("--archiveoutputpath ", ArchiveOutputPath);
Microsoft.NET.Sdk.Publish.Tasks (3)
Tasks\MsDeploy\MSDeploy.cs (3)
1013
commandLine.
AppendSwitchIfNotNull
("-appHostConfigDir:", WebServerAppHostConfigDirectory);
1014
commandLine.
AppendSwitchIfNotNull
("-webServerDir:", WebServerDirectory);
1016
commandLine.
AppendSwitchIfNotNull
("-webServerManifest:", Path.GetFileName(WebServerManifest));