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