167 references to Constants
dotnet (45)
CommandFactory\CommandFactory.cs (1)
17string configuration = Constants.DefaultConfiguration)
CommandFactory\CommandFactoryUsingResolver.cs (3)
21string configuration = Constants.DefaultConfiguration, 41string configuration = Constants.DefaultConfiguration, 62string configuration = Constants.DefaultConfiguration,
CommandFactory\CommandResolution\LocalToolsCommandResolver.cs (1)
85Constants.AnyRid,
CommandFactory\CommandResolution\MSBuildProject.cs (1)
81{ Constants.MSBUILD_EXE_PATH, _msBuildExePath }
CommandFactory\CommandResolution\ProjectFactory.cs (1)
31var msBuildExePath = _environment.GetEnvironmentVariable(Constants.MSBUILD_EXE_PATH);
CommandFactory\CommandResolution\ProjectToolsCommandResolver.cs (1)
375var msBuildExePath = _environment.GetEnvironmentVariable(Constants.MSBUILD_EXE_PATH);
CommandFactory\CommandResolver.cs (2)
18string configuration = Constants.DefaultConfiguration, 37string configuration = Constants.DefaultConfiguration,
CommandFactory\ICommandFactory.cs (1)
17string configuration = Constants.DefaultConfiguration);
Commands\Restore\RestoringCommand.cs (3)
25{ Constants.EnableDefaultCompileItems, "false" }, 26{ Constants.EnableDefaultEmbeddedResourceItems, "false" }, 27{ Constants.EnableDefaultNoneItems, "false" },
Commands\Run\CommonRunHelpers.cs (2)
20globalProperties[Constants.MSBuildExtensionsPath] = AppContext.BaseDirectory; 39return msbuildArgs.CloneWithAdditionalArgs(Constants.TerminalLogger_DisableNodeDisplay);
Commands\Run\RunCommand.cs (9)
348? MSBuildArgs.CloneWithAdditionalTargets(Constants.Build, Constants.ComputeRunArguments, Constants.CoreCompile) 349: MSBuildArgs.CloneWithAdditionalTargets(Constants.ComputeRunArguments, Constants.CoreCompile); 497if (!project.Build([Constants.ComputeRunArguments], loggers: loggersForBuild, remoteLoggers: null, out _)) 499throw new GracefulException(CliCommandStrings.RunCommandEvaluationExceptionBuildFailed, Constants.ComputeRunArguments); 852globalProperties[Constants.EnableDefaultItems] = "false"; 853globalProperties[Constants.MSBuildExtensionsPath] = AppContext.BaseDirectory;
Commands\Run\VirtualProjectBuildingCommand.cs (7)
343targetsToBuild: RequestedTargets ?? [Constants.Build, Constants.CoreCompile]); 467if (result.TryGetResultsForTarget(Constants.CoreCompile, out var coreCompileResult) && 469result.TryGetResultsForTarget(Constants.Build, out var buildResult) && 478Reporter.Verbose.WriteLine($"Reusing previous CSC arguments ({cache.CurrentEntry.CscArguments.Length}) because none were found in the {Constants.CoreCompile} target."); 483.Select(static i => i.GetMetadata(Constants.Identity)) 487cache.CurrentEntry.BuildResultFile = buildResultItem.GetMetadata(Constants.FullPath);
Commands\Test\MTP\SolutionAndProjectUtility.cs (1)
18private static readonly string[] s_computeRunArgumentsTarget = [Constants.ComputeRunArguments];
Commands\Tool\Install\LocalToolsResolverCacheExtensions.cs (1)
42Constants.AnyRid,
Commands\Tool\Install\ProjectRestorer.cs (2)
32argsToPassToRestore.AddRange(["--runtime", Constants.AnyRid]); 68&& _additionalRestoreArguments.Contains(Constants.RestoreInteractiveOption, StringComparer.Ordinal))
Commands\Tool\Restore\ToolPackageRestorer.cs (2)
92Constants.AnyRid, 123Constants.AnyRid,
Commands\Workload\Install\WorkloadManifestUpdater.cs (2)
183var workloadSetVersionFilePath = Path.Combine(advertisedPath, Constants.workloadSetVersionFileName); 357File.WriteAllText(Path.Combine(adManifestPath, Constants.workloadSetVersionFileName), workloadSetVersion);
DotNetCommandFactory.cs (2)
23string configuration = Constants.DefaultConfiguration) 28Debug.Assert(configuration == Constants.DefaultConfiguration, "BuiltInCommand doesn't support the 'configuration' argument.");
ToolManifest\ToolManifestFinder.cs (3)
167currentSearchDirectory.Value.WithSubDirectories(Constants.DotConfigDirectoryName); 224var currentSearchGitDirectory = currentSearchDirectory.Value.WithSubDirectories(Constants.GitDirectoryName); 253string manifestFileLocation = Path.Combine(folderPath.Value, Constants.ToolManifestFileName);
dotnet.Tests (27)
BuildServerTests\RazorServerTests.cs (1)
144Constants.DefaultConfiguration))
BuildServerTests\VBCSCompilerServerTests.cs (1)
53Constants.DefaultConfiguration))
CommandFactoryTests\GivenALocalToolsCommandResolver.cs (4)
102Constants.AnyRid, 135Constants.AnyRid, 200Constants.AnyRid, 207Constants.AnyRid,
CommandFactoryTests\GivenAProjectDependencyCommandResolver.cs (2)
18Constants.MSBUILD_EXE_PATH, 165Constants.MSBUILD_EXE_PATH,
CommandTests\MSBuild\GivenDotnetBuildInvocation.cs (2)
145command.GetArgumentTokensToMSBuild().Should().Contain(Constants.TerminalLogger_DisableNodeDisplay); 149command.GetArgumentTokensToMSBuild().Should().NotContain(Constants.TerminalLogger_DisableNodeDisplay);
CommandTests\Publish\GivenDotnetPublishPublishesProjects.cs (5)
124var outputProgram = Path.Combine(outputDirectory.FullName, $"{testAppName}{Constants.ExeSuffix}"); 139var outputProgram = Path.Combine(outputDirectory.FullName, $"{testAppName}{Constants.ExeSuffix}"); 222$"{testAppName}{Constants.ExeSuffix}", 229var outputProgram = Path.Combine(outputDirectory.FullName, $"{testAppName}{Constants.ExeSuffix}"); 250$"{testAppName}{Constants.ExeSuffix}",
CommandTests\Run\GivenDotnetRunBuildsCsProj.cs (2)
776.HaveStdOutContaining($"dotnet{Constants.ExeSuffix}"); 789.And.HaveStdOutContaining($"AppOutputsExecutablePath{Constants.ExeSuffix}");
CommandTests\Run\RunFileTests.cs (1)
1862new RunExeCommand(Log, Path.Join(publishDir, "Program", $"Program{Constants.ExeSuffix}"))
CommandTests\Tool\Install\ToolInstallLocalCommandTests.cs (3)
311Constants.AnyRid, 420Constants.AnyRid, 565Constants.AnyRid,
CommandTests\Tool\Restore\ToolRestoreCommandTests.cs (2)
142Constants.AnyRid, 282Constants.AnyRid,
CommandTests\Tool\Restore\ToolRestoreCommandWithMultipleNugetConfigTests.cs (2)
147Constants.AnyRid, 156Constants.AnyRid,
CommandTests\Tool\Run\ToolRunCommandTests.cs (1)
95Constants.AnyRid,
CommandTests\Tool\Update\ToolUpdateLocalCommandTests.cs (1)
420Constants.AnyRid,
Microsoft.DotNet.Cli.Utils (1)
Muxer.cs (1)
72processPath = Path.Combine(root, $"dotnet{Constants.ExeSuffix}");
Microsoft.DotNet.PackageInstall.Tests (6)
LocalToolsResolverCacheTests.cs (6)
42string runtimeIdentifier = Constants.AnyRid; 82string runtimeIdentifier = Constants.AnyRid; 116string runtimeIdentifier = Constants.AnyRid; 156string runtimeIdentifier = Constants.AnyRid; 238string runtimeIdentifier = Constants.AnyRid; 295string runtimeIdentifier = Constants.AnyRid;
Microsoft.DotNet.Tools.Tests.ComponentMocks (1)
ToolPackageDownloaderMock.cs (1)
141Constants.AnyRid);
Microsoft.NET.Build.Tests (25)
AppHostTests.cs (5)
21$"{testProjectName}{Constants.ExeSuffix}", 69var hostExecutable = $"HelloWorld{Constants.ExeSuffix}"; 294outputDirectory.Should().HaveFiles(new[] { $"{testProject.Name}{Constants.ExeSuffix}" }); 302ReadOnlySpan<byte> appBytes = File.ReadAllBytes(Path.Combine(outputDirectory.FullName, $"{testProject.Name}{Constants.ExeSuffix}")); 433var intermediateAppHost = Path.Combine(intermediateDirectory, "apphost" + Constants.ExeSuffix);
GivenThatWeWantToBuildAnAppWithLibrariesAndRid.cs (2)
49var selfContainedExecutable = $"App{Constants.ExeSuffix}"; 101$"App{Constants.ExeSuffix}",
GivenThatWeWantToBuildASelfContainedApp.cs (9)
50var selfContainedExecutable = $"HelloWorld{Constants.ExeSuffix}"; 75$"apphost{Constants.ExeSuffix}", 139var selfContainedExecutable = $"HelloWorld{Constants.ExeSuffix}"; 504itemsWithTargetPaths.Should().NotContain((i) => i.value.EndsWith($"singlefilehost{Constants.ExeSuffix}")); 506i.value.EndsWith($"apphost{Constants.ExeSuffix}") 507&& i.metadata["TargetPath"] == $"{project.Name}{Constants.ExeSuffix}"); 518$"{project.Name}{Constants.ExeSuffix}"); 586var selfContainedExecutable = $"HelloWorld{Constants.ExeSuffix}"; 629var selfContainedExecutable = $"HelloWorld{Constants.ExeSuffix}";
GivenThatWeWantToCopyLocalDependencies.cs (5)
42$"{ProjectName}{Constants.ExeSuffix}", 82$"{ProjectName}{Constants.ExeSuffix}", 121$"{ProjectName}{Constants.ExeSuffix}", 333$"{ProjectName}{Constants.ExeSuffix}", 349$"apphost{Constants.ExeSuffix}",
GivenThatWeWantToFilterSatelliteAssemblies.cs (1)
70expectedFiles.Add($"{testProject.Name}{Constants.ExeSuffix}");
GivenThatWeWantToUseVB.cs (1)
129$"HelloWorld{Constants.ExeSuffix}",
ReferenceExeTests.cs (2)
145var mainExePath = Path.Combine(outputDirectory, MainProject.Name + Constants.ExeSuffix); 147var referencedExePath = Path.Combine(outputDirectory, ReferencedProject.Name + Constants.ExeSuffix);
Microsoft.NET.Publish.Tests (53)
FilesCopiedToPublishDirTests.cs (1)
82string exeSuffix = specifyRid ? ".exe" : Constants.ExeSuffix;
GivenThatWeWantToFilterSatelliteAssemblies.cs (1)
51files.Add($"{testProject.Name}{Constants.ExeSuffix}");
GivenThatWeWantToPublishAFrameworkDependentApp.cs (1)
39var appHostName = $"{TestProjectName}{Constants.ExeSuffix}";
GivenThatWeWantToPublishAHelloWorldProject.cs (7)
96var selfContainedExecutable = $"HelloWorld{Constants.ExeSuffix}"; 115$"apphost{Constants.ExeSuffix}" 164publishDirectory.Should().HaveFile($"Hello.World{Constants.ExeSuffix}"); 342var selfContainedExecutable = testProject.Name + Constants.ExeSuffix; 908output.Should().HaveFile($"{testProject.Name}{Constants.ExeSuffix}"); 912output.Should().NotHaveFile($"{testProject.Name}{Constants.ExeSuffix}"); 1152TestCommand runCommand = new RunExeCommand(Log, Path.Combine(publishDirectory, $"{testProject.Name}{Constants.ExeSuffix}"));
GivenThatWeWantToPublishAnAotApp.cs (11)
61var publishedExe = Path.Combine(publishDirectory, $"{testProject.Name}{Constants.ExeSuffix}"); 104var publishedExe = Path.Combine(publishDirectory, $"{testProject.Name}{Constants.ExeSuffix}"); 149var publishedExe = Path.Combine(publishDirectory, $"{testProject.Name}{Constants.ExeSuffix}"); 201var publishedExe = Path.Combine(publishDirectory, $"{testProject.Name}{Constants.ExeSuffix}"); 243var assemblyPath = Path.Combine(outputDirectory, $"{projectName}{Constants.ExeSuffix}"); 296var publishedExe = Path.Combine(publishDirectory, $"{testProject.Name}{Constants.ExeSuffix}"); 339var publishedExe = Path.Combine(publishDirectory, $"{testProject.Name}{Constants.ExeSuffix}"); 369var publishedExe = Path.Combine(publishDirectory, $"{testProject.Name}{Constants.ExeSuffix}"); 415var publishedExe = Path.Combine(publishDirectory, $"{testProject.Name}{Constants.ExeSuffix}"); 743var publishedExe = Path.Combine(publishDirectory.FullName, $"{testProject.Name}{Constants.ExeSuffix}"); 838var publishedExe = Path.Combine(publishDirectory.FullName, $"{testProject.Name}{Constants.ExeSuffix}");
GivenThatWeWantToPublishAnAppWithLibrariesAndRid.cs (3)
26var selfContainedExecutable = $"App{Constants.ExeSuffix}"; 48$"apphost{Constants.ExeSuffix}", 67$"App{Constants.ExeSuffix}",
GivenThatWeWantToPublishASingleFileApp.cs (12)
36private readonly string SingleFile = $"{TestProjectName}{Constants.ExeSuffix}"; 105var singleFilePath = Path.Combine(GetPublishDirectory(cmd).FullName, $"SingleFileTest{Constants.ExeSuffix}"); 288string[] expectedFiles = { $"{testProject.Name}{Constants.ExeSuffix}", $"{testProject.Name}.pdb" }; 328var singleFilePath = Path.Combine(publishDir, $"{testProject.Name}{Constants.ExeSuffix}"); 420string[] expectedFiles = { $"{testProject.Name}{Constants.ExeSuffix}" }; 480string[] expectedFiles = { $"{testProject.Name}{Constants.ExeSuffix}" }; 569$"{testProject.Name}{Constants.ExeSuffix}"); 827var singleFilePath = Path.Combine(publishDir, $"{testProject.Name}{Constants.ExeSuffix}"); 960var singleFilePath = Path.Combine(GetPublishDirectory(publishCommand, ToolsetInfo.CurrentTargetFramework).FullName, $"SingleFileTest{Constants.ExeSuffix}"); 991var singleFilePath = Path.Combine(GetPublishDirectory(publishCommand, ToolsetInfo.CurrentTargetFramework).FullName, $"SingleFileTest{Constants.ExeSuffix}"); 1025var singleFilePath = Path.Combine(GetPublishDirectory(publishCommand, ToolsetInfo.CurrentTargetFramework).FullName, $"SingleFileTest{Constants.ExeSuffix}"); 1058var host = $"SingleFileTest{Constants.ExeSuffix}";
GivenThatWeWantToPublishAToolProject.cs (2)
44.Should().HaveFile("consoledemo" + Constants.ExeSuffix); 62.Should().HaveFile("consoledemo" + Constants.ExeSuffix)
GivenThatWeWantToPublishAWebApp.cs (6)
87$"{testProject.Name}{Constants.ExeSuffix}", 98$"apphost{Constants.ExeSuffix}", 101new RunExeCommand(Log, Path.Combine(output.FullName, $"{testProject.Name}{Constants.ExeSuffix}")) 146$"{testProject.Name}{Constants.ExeSuffix}", 231output.Should().HaveFile($"{testProject.Name}{Constants.ExeSuffix}"); 235output.Should().NotHaveFile($"{testProject.Name}{Constants.ExeSuffix}");
GivenThatWeWantToPublishToClickOnce.cs (3)
88$"application files\\{testProject.Name}_1_2_3_4\\launcher{Constants.ExeSuffix}", 94$"application files\\{testProject.Name}_1_2_3_4\\{testProject.Name}{Constants.ExeSuffix}", 111$"application files\\{testProject.Name}_1_2_3_4\\{testProject.Name}{Constants.ExeSuffix}",
GivenThatWeWantToRunILLink.cs (1)
132var exe = Path.Combine(publishDirectory.FullName, $"{testProject.Name}{Constants.ExeSuffix}");
PublishItemsOutputGroupOutputsTests.cs (1)
82string exeSuffix = specifyRid ? ".exe" : Constants.ExeSuffix;
PublishItemsOutputGroupTests.cs (1)
67string exeSuffix = specifyRid ? ".exe" : Constants.ExeSuffix;
RuntimeIdentifiersTests.cs (3)
63var selfContainedExecutable = $"{testProject.Name}{Constants.ExeSuffix}"; 105var selfContainedExecutable = $"{testProject.Name}{Constants.ExeSuffix}"; 172var selfContainedExecutable = $"{testProject.Name}{Constants.ExeSuffix}";
Microsoft.NET.TestFramework (8)
Assertions\DependencyContextAssertions.cs (1)
70return Path.Combine(folder, appName + Constants.ExeSuffix);
TestContext.cs (4)
237testContext.NuGetExePath = Path.Combine(artifactsDir, ".nuget", $"nuget{Constants.ExeSuffix}"); 245testContext.NuGetExePath = Path.Combine(testContext.TestExecutionDirectory, ".nuget", $"nuget{Constants.ExeSuffix}"); 260testContext.NuGetExePath = Path.Combine(nugetFolder, $"nuget{Constants.ExeSuffix}"); 283Constants.MSBUILD_EXE_PATH,
ToolsetInfo.cs (3)
78DotNetHostPath = Path.Combine(dotNetRoot, $"dotnet{Constants.ExeSuffix}"); 208environment[Constants.MSBUILD_EXE_PATH] = ""; 251=> Path.Combine(dotnetRoot ?? string.Empty, "dotnet" + Constants.ExeSuffix);
Microsoft.NET.ToolPack.Tests (1)
GivenThatWeWantToPackAToolProject.cs (1)
198.Should().Be("consoledemo" + Constants.ExeSuffix, because: "The RunCommand should recognize that this is an AppHost-using project and should use the AppHost for non-tool use cases.");