176 references to AppendSwitchIfNotNull
Microsoft.Build.Tasks.CodeAnalysis (59)
src\Compilers\Core\MSBuildTask\CommandLineBuilderExtension.cs (3)
104AppendSwitchIfNotNull(switchName, value.ToString(CultureInfo.InvariantCulture)); 153AppendSwitchIfNotNull(outerSwitchName, innerSwitchName + quotedParameter); 248AppendSwitchIfNotNull(switchName, parameter.ItemSpec);
src\Compilers\Core\MSBuildTask\Csc.cs (16)
206commandLine.AppendSwitchIfNotNull("/sdkpath:", RuntimeEnvironment.GetRuntimeDirectory()); 214commandLine.AppendSwitchIfNotNull("/moduleassemblyname:", ModuleAssemblyName); 215commandLine.AppendSwitchIfNotNull("/pdb:", PdbFile); 217commandLine.AppendSwitchIfNotNull("/platform:", PlatformWith32BitPreference); 218commandLine.AppendSwitchIfNotNull("/errorreport:", ErrorReport); 220commandLine.AppendSwitchIfNotNull("/doc:", DocumentationFile); 221commandLine.AppendSwitchIfNotNull("/baseaddress:", BaseAddress); 223commandLine.AppendSwitchIfNotNull("/win32res:", Win32Resource); 224commandLine.AppendSwitchIfNotNull("/main:", MainEntryPoint); 225commandLine.AppendSwitchIfNotNull("/appconfig:", ApplicationConfiguration); 227commandLine.AppendSwitchIfNotNull("/preferreduilang:", PreferredUILang); 229commandLine.AppendSwitchIfNotNull("/nullable:", Nullable); 246commandLine.AppendSwitchIfNotNull("/sqmsessionguid:", VsSessionGuid); 281commandLine.AppendSwitchIfNotNull("@", response.ItemSpec); 302commandLine.AppendSwitchIfNotNull("/features:", $"InterceptorsNamespaces={featureValue}"); 433commandLine.AppendSwitchIfNotNull(switchName, reference.ItemSpec);
src\Compilers\Core\MSBuildTask\InteractiveCompiler.cs (2)
210commandLine.AppendSwitchIfNotNull("@", response.ItemSpec); 228commandLine.AppendSwitchIfNotNull("@", scriptResponse.ItemSpec);
src\Compilers\Core\MSBuildTask\ManagedCompiler.cs (20)
880commandLine.AppendSwitchIfNotNull("/debug:", DebugType); 887commandLine.AppendSwitchIfNotNull("/generatedfilesout:", GeneratedFilesOutputPath); 888commandLine.AppendSwitchIfNotNull("/keycontainer:", KeyContainer); 889commandLine.AppendSwitchIfNotNull("/keyfile:", KeyFile); 895commandLine.AppendSwitchIfNotNull("/pathmap:", PathMap); 899commandLine.AppendSwitchIfNotNull("/ruleset:", CodeAnalysisRuleSet); 900commandLine.AppendSwitchIfNotNull("/errorlog:", ErrorLog); 901commandLine.AppendSwitchIfNotNull("/subsystemversion:", SubsystemVersion); 905commandLine.AppendSwitchIfNotNull("/target:", TargetType); 908commandLine.AppendSwitchIfNotNull("/win32icon:", Win32Icon); 909commandLine.AppendSwitchIfNotNull("/win32manifest:", Win32Manifest); 923commandLine.AppendSwitchIfNotNull("/runtimemetadataversion:", RuntimeMetadataVersion); 924commandLine.AppendSwitchIfNotNull("/checksumalgorithm:", ChecksumAlgorithm); 926commandLine.AppendSwitchIfNotNull("/sourcelink:", SourceLink); 927commandLine.AppendSwitchIfNotNull("/langversion:", LangVersion); 947commandLine.AppendSwitchIfNotNull("/features:", feature.Trim()); 965commandLine.AppendSwitchIfNotNull("/analyzer:", analyzer.ItemSpec); 978commandLine.AppendSwitchIfNotNull("/additionalfile:", additionalFile.ItemSpec); 997commandLine.AppendSwitchIfNotNull("/embed:", embeddedFile.ItemSpec); 1011commandLine.AppendSwitchIfNotNull("/analyzerconfig:", analyzerConfigFile.ItemSpec);
src\Compilers\Core\MSBuildTask\Vbc.cs (18)
391commandLine.AppendSwitchIfNotNull("/sdkpath:", RuntimeEnvironment.GetRuntimeDirectory()); 394commandLine.AppendSwitchIfNotNull("/baseaddress:", this.GetBaseAddressInHex()); 402commandLine.AppendSwitchIfNotNull("/optioncompare:", this.OptionCompare); 436commandLine.AppendSwitchIfNotNull("/optionstrict:", this.OptionStrictType); 443commandLine.AppendSwitchIfNotNull("/errorreport:", this.ErrorReport); 444commandLine.AppendSwitchIfNotNull("/platform:", this.PlatformWith32BitPreference); 446commandLine.AppendSwitchIfNotNull("/rootnamespace:", this.RootNamespace); 447commandLine.AppendSwitchIfNotNull("/sdkpath:", this.SdkPath); 448commandLine.AppendSwitchIfNotNull("/moduleassemblyname:", this.ModuleAssemblyName); 450commandLine.AppendSwitchIfNotNull("/preferreduilang:", this.PreferredUILang); 455commandLine.AppendSwitchIfNotNull("/vbruntime:", this.VBRuntimePath); 474commandLine.AppendSwitchIfNotNull("/vbruntime:", vbRuntimeSwitch); 488commandLine.AppendSwitchIfNotNull("/", this.Verbosity); 497commandLine.AppendSwitchIfNotNull("/doc:", this.DocumentationFile); 502commandLine.AppendSwitchIfNotNull("/win32resource:", this.Win32Resource); 507commandLine.AppendSwitchIfNotNull("/main:", this.MainEntryPoint); 544commandLine.AppendSwitchIfNotNull("/sqmsessionguid:", this.VsSessionGuid); 556commandLine.AppendSwitchIfNotNull("@", response.ItemSpec);
Microsoft.Build.Tasks.CodeAnalysis.Sdk (59)
src\Compilers\Core\MSBuildTask\CommandLineBuilderExtension.cs (3)
104AppendSwitchIfNotNull(switchName, value.ToString(CultureInfo.InvariantCulture)); 153AppendSwitchIfNotNull(outerSwitchName, innerSwitchName + quotedParameter); 248AppendSwitchIfNotNull(switchName, parameter.ItemSpec);
src\Compilers\Core\MSBuildTask\Csc.cs (16)
206commandLine.AppendSwitchIfNotNull("/sdkpath:", RuntimeEnvironment.GetRuntimeDirectory()); 214commandLine.AppendSwitchIfNotNull("/moduleassemblyname:", ModuleAssemblyName); 215commandLine.AppendSwitchIfNotNull("/pdb:", PdbFile); 217commandLine.AppendSwitchIfNotNull("/platform:", PlatformWith32BitPreference); 218commandLine.AppendSwitchIfNotNull("/errorreport:", ErrorReport); 220commandLine.AppendSwitchIfNotNull("/doc:", DocumentationFile); 221commandLine.AppendSwitchIfNotNull("/baseaddress:", BaseAddress); 223commandLine.AppendSwitchIfNotNull("/win32res:", Win32Resource); 224commandLine.AppendSwitchIfNotNull("/main:", MainEntryPoint); 225commandLine.AppendSwitchIfNotNull("/appconfig:", ApplicationConfiguration); 227commandLine.AppendSwitchIfNotNull("/preferreduilang:", PreferredUILang); 229commandLine.AppendSwitchIfNotNull("/nullable:", Nullable); 246commandLine.AppendSwitchIfNotNull("/sqmsessionguid:", VsSessionGuid); 281commandLine.AppendSwitchIfNotNull("@", response.ItemSpec); 302commandLine.AppendSwitchIfNotNull("/features:", $"InterceptorsNamespaces={featureValue}"); 433commandLine.AppendSwitchIfNotNull(switchName, reference.ItemSpec);
src\Compilers\Core\MSBuildTask\InteractiveCompiler.cs (2)
210commandLine.AppendSwitchIfNotNull("@", response.ItemSpec); 228commandLine.AppendSwitchIfNotNull("@", scriptResponse.ItemSpec);
src\Compilers\Core\MSBuildTask\ManagedCompiler.cs (20)
880commandLine.AppendSwitchIfNotNull("/debug:", DebugType); 887commandLine.AppendSwitchIfNotNull("/generatedfilesout:", GeneratedFilesOutputPath); 888commandLine.AppendSwitchIfNotNull("/keycontainer:", KeyContainer); 889commandLine.AppendSwitchIfNotNull("/keyfile:", KeyFile); 895commandLine.AppendSwitchIfNotNull("/pathmap:", PathMap); 899commandLine.AppendSwitchIfNotNull("/ruleset:", CodeAnalysisRuleSet); 900commandLine.AppendSwitchIfNotNull("/errorlog:", ErrorLog); 901commandLine.AppendSwitchIfNotNull("/subsystemversion:", SubsystemVersion); 905commandLine.AppendSwitchIfNotNull("/target:", TargetType); 908commandLine.AppendSwitchIfNotNull("/win32icon:", Win32Icon); 909commandLine.AppendSwitchIfNotNull("/win32manifest:", Win32Manifest); 923commandLine.AppendSwitchIfNotNull("/runtimemetadataversion:", RuntimeMetadataVersion); 924commandLine.AppendSwitchIfNotNull("/checksumalgorithm:", ChecksumAlgorithm); 926commandLine.AppendSwitchIfNotNull("/sourcelink:", SourceLink); 927commandLine.AppendSwitchIfNotNull("/langversion:", LangVersion); 947commandLine.AppendSwitchIfNotNull("/features:", feature.Trim()); 965commandLine.AppendSwitchIfNotNull("/analyzer:", analyzer.ItemSpec); 978commandLine.AppendSwitchIfNotNull("/additionalfile:", additionalFile.ItemSpec); 997commandLine.AppendSwitchIfNotNull("/embed:", embeddedFile.ItemSpec); 1011commandLine.AppendSwitchIfNotNull("/analyzerconfig:", analyzerConfigFile.ItemSpec);
src\Compilers\Core\MSBuildTask\Vbc.cs (18)
391commandLine.AppendSwitchIfNotNull("/sdkpath:", RuntimeEnvironment.GetRuntimeDirectory()); 394commandLine.AppendSwitchIfNotNull("/baseaddress:", this.GetBaseAddressInHex()); 402commandLine.AppendSwitchIfNotNull("/optioncompare:", this.OptionCompare); 436commandLine.AppendSwitchIfNotNull("/optionstrict:", this.OptionStrictType); 443commandLine.AppendSwitchIfNotNull("/errorreport:", this.ErrorReport); 444commandLine.AppendSwitchIfNotNull("/platform:", this.PlatformWith32BitPreference); 446commandLine.AppendSwitchIfNotNull("/rootnamespace:", this.RootNamespace); 447commandLine.AppendSwitchIfNotNull("/sdkpath:", this.SdkPath); 448commandLine.AppendSwitchIfNotNull("/moduleassemblyname:", this.ModuleAssemblyName); 450commandLine.AppendSwitchIfNotNull("/preferreduilang:", this.PreferredUILang); 455commandLine.AppendSwitchIfNotNull("/vbruntime:", this.VBRuntimePath); 474commandLine.AppendSwitchIfNotNull("/vbruntime:", vbRuntimeSwitch); 488commandLine.AppendSwitchIfNotNull("/", this.Verbosity); 497commandLine.AppendSwitchIfNotNull("/doc:", this.DocumentationFile); 502commandLine.AppendSwitchIfNotNull("/win32resource:", this.Win32Resource); 507commandLine.AppendSwitchIfNotNull("/main:", this.MainEntryPoint); 544commandLine.AppendSwitchIfNotNull("/sqmsessionguid:", this.VsSessionGuid); 556commandLine.AppendSwitchIfNotNull("@", response.ItemSpec);
Microsoft.Build.Tasks.Core (11)
CommandLineBuilderExtension.cs (3)
121AppendSwitchIfNotNull(switchName, value.ToString(CultureInfo.InvariantCulture)); 145AppendSwitchIfNotNull(outerSwitchName, innerSwitchName + quotedParameter); 245AppendSwitchIfNotNull(switchName, parameter.ItemSpec);
LC.cs (4)
146commandLine.AppendSwitchIfNotNull("/target:", LicenseTarget.ItemSpec); 150commandLine.AppendSwitchIfNotNull("/complist:", item.ItemSpec); 153commandLine.AppendSwitchIfNotNull("/outdir:", OutputDirectory); 159commandLine.AppendSwitchIfNotNull("/i:", item.ItemSpec);
RoslynCodeTaskFactory\RoslynCodeTaskFactoryCompilers.cs (4)
109commandLine.AppendSwitchIfNotNull(ReferenceSwitch, reference.ItemSpec); 116commandLine.AppendSwitchIfNotNull("/nowarn:", NoWarn); 117commandLine.AppendSwitchIfNotNull("/target:", TargetType); 168commandLine.AppendSwitchIfNotNull("/rootnamespace:", RootNamespace);
Microsoft.Build.Tasks.UnitTests (2)
ToolTaskExtension_Tests.cs (2)
108commandLineBuilder.AppendSwitchIfNotNull("/A:", "D66B977148114482A88B0EFC1E531F02"); 109commandLineBuilder.AppendSwitchIfNotNull("/B:", "F9E03765A87543F4B385664B8DB7619D");
Microsoft.Build.Utilities.Core (5)
CommandLineBuilder.cs (1)
556AppendSwitchIfNotNull(switchName, parameter.ItemSpec);
TrackedDependencies\FileTracker.cs (4)
612builder.AppendSwitchIfNotNull("/d ", dllName); 622builder.AppendSwitchIfNotNull("/i ", intermediateDirectory); 625builder.AppendSwitchIfNotNull("/r ", rootFiles); 627builder.AppendSwitchIfNotNull("/b ", cancelEventName); // b for break
Microsoft.Build.Utilities.UnitTests (14)
CommandLineBuilder_Tests.cs (14)
42c.AppendSwitchIfNotNull("/animal:", "dog"); 55c.AppendSwitchIfNotNull("/animal:", "dog and pony"); 68c.AppendSwitchIfNotNull("/i:", "iI"); 300c.AppendSwitchIfNotNull("/D", "LSYSTEM_COMPATIBLE_ASSEMBLY_NAME=L\"Microsoft.Windows.SystemCompatible\""); 311c.AppendSwitchIfNotNull("/D", @"ASSEMBLY_KEY_FILE=""c:\\foo\\FinalKeyFile.snk"""); 322c.AppendSwitchIfNotNull("/D", @"""A B"" and ""C"""); 333c.AppendSwitchIfNotNull("/D", @"A \B"); 344c.AppendSwitchIfNotNull("/D", @"A"" \""B"); 367c.AppendSwitchIfNotNull("/D", @"A B\"); 378c.AppendSwitchIfNotNull("/D", @"AB\"); 389c.AppendSwitchIfNotNull("/D", @"foo-bar"); 400c.AppendSwitchIfNotNull("/D", @"foo-bar"); 436c.AppendSwitchIfNotNull("/D", @"A='""'"); // /DA='"' 445c.AppendSwitchIfNotNull("/foo:", "bar");
Microsoft.DotNet.Build.Tasks.Workloads (9)
Wix\CommandLineBuilderExtensions.cs (1)
25builder.AppendSwitchIfNotNull(switchName, value);
Wix\CompilerToolTask.cs (2)
74CommandLineBuilder.AppendSwitchIfNotNull("-out ", OutputPath); 78CommandLineBuilder.AppendSwitchIfNotNull("-arch ", Architecture);
Wix\HarvesterToolTask.cs (4)
110CommandLineBuilder.AppendSwitchIfNotNull("dir ", SourceDirectory); 112CommandLineBuilder.AppendSwitchIfNotNull("-cg ", ComponentGroupName); 136CommandLineBuilder.AppendSwitchIfNotNull("-dr ", DirectoryReference); 137CommandLineBuilder.AppendSwitchIfNotNull("-o ", OutputFile);
Wix\LinkerToolTask.cs (2)
76CommandLineBuilder.AppendSwitchIfNotNull("-o ", OutputFile); 79CommandLineBuilder.AppendSwitchIfNotNull("-sice:", SuppressIces);
Microsoft.NET.Build.Containers (14)
Tasks\CreateNewImageToolTask.cs (14)
120builder.AppendSwitchIfNotNull("--baseregistry ", BaseRegistry); 121builder.AppendSwitchIfNotNull("--baseimagename ", BaseImageName); 122builder.AppendSwitchIfNotNull("--repository ", Repository); 123builder.AppendSwitchIfNotNull("--workingdirectory ", WorkingDirectory); 128builder.AppendSwitchIfNotNull("--baseimagetag ", BaseImageTag); 132builder.AppendSwitchIfNotNull("--baseimagedigest ", BaseImageDigest); 136builder.AppendSwitchIfNotNull("--outputregistry ", OutputRegistry); 140builder.AppendSwitchIfNotNull("--localregistry ", LocalRegistry); 144builder.AppendSwitchIfNotNull("--appcommandinstruction ", AppCommandInstruction); 148builder.AppendSwitchIfNotNull("--image-format ", ImageFormat); 205builder.AppendSwitchIfNotNull("--rid ", ContainerRuntimeIdentifier); 210builder.AppendSwitchIfNotNull("--ridgraphpath ", RuntimeIdentifierGraphPath); 215builder.AppendSwitchIfNotNull("--container-user ", ContainerUser); 220builder.AppendSwitchIfNotNull("--archiveoutputpath ", ArchiveOutputPath);
Microsoft.NET.Sdk.Publish.Tasks (3)
Tasks\MsDeploy\MSDeploy.cs (3)
1013commandLine.AppendSwitchIfNotNull("-appHostConfigDir:", WebServerAppHostConfigDirectory); 1014commandLine.AppendSwitchIfNotNull("-webServerDir:", WebServerDirectory); 1016commandLine.AppendSwitchIfNotNull("-webServerManifest:", Path.GetFileName(WebServerManifest));