72 references to Constants
Microsoft.Build (45)
BackEnd\Components\Communications\CurrentHost.cs (3)
31Constants.DotnetProcessName); 39&& Path.GetFileName(processPath) == Constants.DotnetProcessName) 51Constants.DotnetProcessName);
BackEnd\Components\Communications\NodeProviderOutOfProcBase.cs (1)
402msbuildLocation = Constants.MSBuildExecutableName;
BackEnd\Components\Communications\NodeProviderOutOfProcTaskHost.cs (5)
393? Constants.MSBuildAssemblyName 394: Constants.MSBuildExecutableName; 457taskHostParameters.TryGetValue(Constants.DotnetHostPath, out string runtimeHostPath); 465if (taskHostParameters.TryGetValue(Constants.MSBuildAssemblyPath, out string msbuildAssemblyPath)) 659CommunicationsUtilities.Trace("For a host context of {0}, spawning executable from {1}.", hostContext.ToString(), msbuildLocation ?? Constants.MSBuildExecutableName);
Construction\Solution\SolutionProjectGenerator.cs (4)
26using Constants = Microsoft.Build.Internal.Constants; 395wrapperProjectToolsVersion = Constants.defaultSolutionWrapperProjectToolsVersion; 1128directProjectProperties = String.Format(CultureInfo.InvariantCulture, "{0}; {1}={2}", directProjectProperties, Constants.SubToolsetVersionPropertyName, traversalProject.SubToolsetVersion); 2101properties[Constants.SubToolsetVersionPropertyName] = traversalProject.SubToolsetVersion;
Definition\Project.cs (2)
27using Constants = Microsoft.Build.Internal.Constants; 3802if (String.Equals(pair.Key, Constants.SubToolsetVersionPropertyName, StringComparison.OrdinalIgnoreCase) && subToolsetVersion != null)
Definition\ProjectCollection.cs (1)
514var fullInformationalVersion = typeof(Constants).GetTypeInfo().Assembly.GetCustomAttribute<AssemblyInformationalVersionAttribute>().InformationalVersion;
Definition\Toolset.cs (6)
645ProjectPropertyInstance subToolsetProperty = overrideGlobalProperties[Constants.SubToolsetVersionPropertyName]; 677ProjectPropertyInstance visualStudioVersionProperty = _globalProperties[Constants.SubToolsetVersionPropertyName]; 688ProjectPropertyInstance visualStudioVersionProperty = _environmentProperties[Constants.SubToolsetVersionPropertyName]; 727if (overrideGlobalProperties != null && overrideGlobalProperties.TryGetValue(Constants.SubToolsetVersionPropertyName, out visualStudioVersion)) 806reservedProperties.Add(ProjectPropertyInstance.Create(ReservedPropertyNames.assemblyVersion, Constants.AssemblyVersion, mayBeReserved: true)); 852propertyBag.Set(ProjectPropertyInstance.Create(Constants.SubToolsetVersionPropertyName, subToolsetVersion));
Definition\ToolsetReader.cs (4)
293defaultToolsVersion = Constants.defaultToolsVersion; 296if (toolsets.ContainsKey(Constants.defaultToolsVersion)) 304Constants.defaultToolsVersion == "2.0", 313defaultToolsVersion = Constants.defaultFallbackToolsVersion;
Evaluation\Evaluator.cs (10)
29using Constants = Microsoft.Build.Internal.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,
Instance\ProjectInstance.cs (2)
2738defaultToolsVersion: Constants.defaultSolutionWrapperProjectToolsVersion, 3241if (String.Equals(globalProperty.Key, Constants.SubToolsetVersionPropertyName, StringComparison.OrdinalIgnoreCase) && explicitSubToolsetVersion != null)
Instance\TaskFactories\AssemblyTaskFactory.cs (5)
285&& taskFactoryIdentityParameters.TryGetValue(Constants.TaskHostExplicitlyRequested, out string isTaskHostFactory) 652string hostPath = getProperty(Constants.DotnetHostPathEnvVarName)?.EvaluatedValue; 653string msBuildAssemblyDirectoryPath = Path.GetDirectoryName(getProperty(Constants.RuntimeIdentifierGraphPath)?.EvaluatedValue) ?? string.Empty; 656taskParams.Add(Constants.DotnetHostPath, hostPath); 657taskParams.Add(Constants.MSBuildAssemblyPath, msBuildAssemblyDirectoryPath);
Instance\TaskRegistry.cs (1)
1493TaskFactoryParameters.Add(Constants.TaskHostExplicitlyRequested, isTaskHostFactory.ToString());
Resources\MSBuildAssemblyFileVersion.cs (1)
49version = Version.Parse(Constants.AssemblyVersion);
Microsoft.Build.Engine.UnitTests (25)
BackEnd\AssemblyTaskFactory_Tests.cs (1)
723factoryParameters.Add(Internal.Constants.TaskHostExplicitlyRequested, "true");
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);
Evaluation\Evaluator_Tests.cs (3)
4359string actual = project.GetPropertyValue(Constants.VisualStudioVersionPropertyName); 4663string propertyValue = project.GetPropertyValue(Constants.MSBuildAllProjectsPropertyName); 4693project.GetPropertyValue(Constants.MSBuildAllProjectsPropertyName).ShouldStartWith(primaryProject.ProjectFile);
NetTaskHost_E2E_Tests.cs (2)
35var bootstrapCorePath = Path.Combine(RunnerUtilities.BootstrapRootPath, "core", Constants.DotnetProcessName); 64var bootstrapCorePath = Path.Combine(RunnerUtilities.BootstrapRootPath, "core", Constants.DotnetProcessName);
ProjectCache\ProjectCacheTests.cs (1)
1735string bootstrapCorePath = Path.Combine(RunnerUtilities.BootstrapRootPath, "core", Constants.DotnetProcessName);
Microsoft.Build.UnitTests.Shared (2)
RunnerUtilities.cs (1)
78msbuildParameters = Path.Combine(BootstrapMsBuildBinaryLocation, "sdk", BootstrapLocationAttribute.BootstrapSdkVersion, Constants.MSBuildAssemblyName) + " " + msbuildParameters;
TestEnvironment.cs (1)
94var bootstrapCorePath = Path.Combine(coreDirectory, Constants.DotnetProcessName);