171 references to Constants
Microsoft.Build (60)
Evaluation\Evaluator.cs (10)
29using Constants = Microsoft.Build.Framework.Constants;
1149SetBuiltInProperty(ReservedPropertyNames.assemblyVersion, Constants.AssemblyVersion);
1230if (!_data.Properties.Contains(Constants.VisualStudioVersionPropertyName))
1232_data.SetProperty(Constants.VisualStudioVersionPropertyName, MSBuildConstants.CurrentVisualStudioVersion, false /* NOT global property */, false /* may NOT be a reserved name */, loggingContext: _evaluationLoggingContext);
1240if (!_data.Properties.Contains(Constants.SubToolsetVersionPropertyName))
1242_data.SetProperty(Constants.SubToolsetVersionPropertyName, _data.SubToolsetVersion, false /* NOT global property */, false /* may NOT be a reserved name */, loggingContext: _evaluationLoggingContext);
1904string dotnetExe = Path.Combine(FileUtilities.GetFolderAbove(sdkResult.Path, 5), Constants.DotnetProcessName);
1907_data.AddSdkResolvedEnvironmentVariable(Constants.DotnetHostPathEnvVarName, dotnetExe);
2616P oldValue = _data.GetProperty(Constants.MSBuildAllProjectsPropertyName);
2619Constants.MSBuildAllProjectsPropertyName,
Microsoft.Build.BuildCheck.UnitTests (2)
Microsoft.Build.CommandLine.UnitTests (4)
Microsoft.Build.Engine.OM.UnitTests (7)
Microsoft.Build.Engine.UnitTests (48)
BackEnd\CacheSerialization_Tests.cs (6)
27new BuildRequestData("path1", new Dictionary<string, string> { ["a1"] = "b1" }, Constants.defaultToolsVersion, new[] { "target1", "target2" }, null),
28Constants.defaultToolsVersion);
32new BuildRequestData("path2", new Dictionary<string, string> { ["a2"] = "b2" }, Constants.defaultToolsVersion, new[] { "target2" }, null),
33Constants.defaultToolsVersion);
36new BuildRequestData("path3", new Dictionary<string, string> { ["a3"] = "b3" }, Constants.defaultToolsVersion, new[] { "target3" }, null),
37Constants.defaultToolsVersion);
BackEnd\ConfigCache_Tests.cs (12)
27new BuildRequestData("path1", new Dictionary<string, string> { ["a1"] = "b1" }, Constants.defaultToolsVersion, new[] { "target1" }, null),
28Constants.defaultToolsVersion);
37new BuildRequestData("path2", new Dictionary<string, string> { ["a2"] = "b2" }, Constants.defaultToolsVersion, new[] { "target2" }, null),
38Constants.defaultToolsVersion);
46new BuildRequestData("path3", new Dictionary<string, string> { ["a3"] = "b3" }, Constants.defaultToolsVersion, new[] { "target3" }, null),
47Constants.defaultToolsVersion);
74new BuildRequestData("path1", new Dictionary<string, string> { ["a1"] = "b1" }, Constants.defaultToolsVersion, new[] { "target1" }, null),
75Constants.defaultToolsVersion);
78new BuildRequestData("path2", new Dictionary<string, string> { ["a2"] = "b2" }, Constants.defaultToolsVersion, new[] { "target2" }, null),
79Constants.defaultToolsVersion);
82new BuildRequestData("path3", new Dictionary<string, string> { ["a3"] = "b3" }, Constants.defaultToolsVersion, new[] { "target3" }, null),
83Constants.defaultToolsVersion);
BuildEnvironmentHelper_Tests.cs (18)
22string expectedMSBuildPath = Path.Combine(msbuildPath, Constants.MSBuildExecutableName).ToLowerInvariant();
31configFilePath.ShouldBe($"{Path.GetDirectoryName(actualMSBuildPath)}{Path.DirectorySeparatorChar}{Constants.MSBuildAssemblyName.ToLowerInvariant()}.config");
41using (var env = new EmptyStandaloneEnviroment(Constants.MSBuildExecutableName))
44var msBuildPath = Path.Combine(path, Constants.MSBuildExecutableName);
76var msBuildPath = Path.Combine(msbuildBinDirectory, Constants.MSBuildExecutableName);
77var msBuildConfig = Path.Combine(msbuildBinDirectory, $"{Constants.MSBuildExecutableName}.config");
115using (var env = new EmptyStandaloneEnviroment(Constants.MSBuildExecutableName))
148using (var env = new EmptyStandaloneEnviroment(Constants.MSBuildExecutableName))
165using (var env = new EmptyStandaloneEnviroment(Constants.MSBuildExecutableName))
181using (var env = new EmptyStandaloneEnviroment(Constants.MSBuildExecutableName))
187Path.GetFileName(BuildEnvironmentHelper.Instance.CurrentMSBuildExePath).ShouldBe(Constants.MSBuildExecutableName);
361using (var env = new EmptyStandaloneEnviroment(Constants.MSBuildExecutableName, writeFakeFiles: true, includeAmd64Folder: true))
363var msBuild64Exe = Path.Combine(env.BuildDirectory, "amd64", Constants.MSBuildExecutableName);
378using (var env = new EmptyStandaloneEnviroment(Constants.MSBuildExecutableName, writeFakeFiles: true, includeAmd64Folder: true))
407using (var env = new EmptyStandaloneEnviroment(Constants.MSBuildExecutableName))
467public string MSBuildExePath64 => Path.Combine(BuildDirectory64, Constants.MSBuildExecutableName);
470: base(Constants.MSBuildExecutableName, false)
511public string MSBuildExePath => Path.Combine(BuildDirectory, Constants.MSBuildExecutableName);
Microsoft.Build.Framework (2)
Microsoft.Build.Framework.UnitTests (2)
Microsoft.Build.Tasks.Core (7)
Microsoft.Build.Tasks.UnitTests (3)
Microsoft.Build.UnitTests.Shared (4)
Microsoft.Build.Utilities.Core (6)
Microsoft.Build.Utilities.UnitTests (20)
ToolLocationHelper_Tests.cs (18)
679string net20Path = ToolLocationHelper.GetPathToDotNetFrameworkFile(Constants.MSBuildExecutableName, TargetDotNetFrameworkVersion.Version20);
681net20Path?.ShouldBe(ToolLocationHelper.GetPathToBuildToolsFile(Constants.MSBuildExecutableName, "2.0"));
683string net35Path = ToolLocationHelper.GetPathToDotNetFrameworkFile(Constants.MSBuildExecutableName, TargetDotNetFrameworkVersion.Version35);
685net35Path?.ShouldBe(ToolLocationHelper.GetPathToBuildToolsFile(Constants.MSBuildExecutableName, "3.5"));
687ToolLocationHelper.GetPathToDotNetFrameworkFile(Constants.MSBuildExecutableName, TargetDotNetFrameworkVersion.Version40).ShouldBe(ToolLocationHelper.GetPathToBuildToolsFile(Constants.MSBuildExecutableName, "4.0"));
689string tv12path = Path.Combine(ProjectCollection.GlobalProjectCollection.GetToolset(ObjectModelHelpers.MSBuildDefaultToolsVersion).ToolsPath, Constants.MSBuildExecutableName);
691tv12path.ShouldBe(ToolLocationHelper.GetPathToBuildToolsFile(Constants.MSBuildExecutableName, ObjectModelHelpers.MSBuildDefaultToolsVersion));
692tv12path.ShouldBe(ToolLocationHelper.GetPathToBuildToolsFile(Constants.MSBuildExecutableName, ToolLocationHelper.CurrentToolsVersion));
702string net20Path = ToolLocationHelper.GetPathToDotNetFrameworkFile(Constants.MSBuildExecutableName, TargetDotNetFrameworkVersion.Version20, UtilitiesDotNetFrameworkArchitecture.Bitness32);
703net20Path?.ShouldBe(ToolLocationHelper.GetPathToBuildToolsFile(Constants.MSBuildExecutableName, "2.0", UtilitiesDotNetFrameworkArchitecture.Bitness32));
705string net35Path = ToolLocationHelper.GetPathToDotNetFrameworkFile(Constants.MSBuildExecutableName, TargetDotNetFrameworkVersion.Version35, UtilitiesDotNetFrameworkArchitecture.Bitness32);
706net35Path?.ShouldBe(ToolLocationHelper.GetPathToBuildToolsFile(Constants.MSBuildExecutableName, "3.5", UtilitiesDotNetFrameworkArchitecture.Bitness32));
708ToolLocationHelper.GetPathToDotNetFrameworkFile(Constants.MSBuildExecutableName, TargetDotNetFrameworkVersion.Version40, UtilitiesDotNetFrameworkArchitecture.Bitness32).ShouldBe(
709ToolLocationHelper.GetPathToBuildToolsFile(Constants.MSBuildExecutableName, "4.0", UtilitiesDotNetFrameworkArchitecture.Bitness32));
712string tv12path = Path.Combine(Path.GetFullPath(toolsPath32.EvaluatedValue), Constants.MSBuildExecutableName);
714tv12path.ShouldBe(ToolLocationHelper.GetPathToBuildToolsFile(Constants.MSBuildExecutableName, ObjectModelHelpers.MSBuildDefaultToolsVersion, UtilitiesDotNetFrameworkArchitecture.Bitness32));
715tv12path.ShouldBe(ToolLocationHelper.GetPathToBuildToolsFile(Constants.MSBuildExecutableName, ToolLocationHelper.CurrentToolsVersion, UtilitiesDotNetFrameworkArchitecture.Bitness32));
MSBuild (6)