1 // Copyright (c) Microsoft. All rights reserved. 2 // Licensed under the MIT license. See LICENSE file in the project root for full license information. 3 4 using System; 5 using System.Reflection; 6 7 // This file is compiled into both Microsoft.Build.Framework and Microsoft.Build.Tasks which can cause collisions. 8 #if MICROSOFT_BUILD_TASKS 9 namespace Microsoft.Build.Tasks 10 #else 11 namespace Microsoft.Build.Shared 12 #endif 13 { 14 /// <summary> 15 /// Constants that we want to be shareable across all our assemblies. 16 /// </summary> 17 internal static class MSBuildConstants 18 { 19 /// <summary> 20 /// The name of the property that indicates the tools path 21 /// </summary> 22 internal const string ToolsPath = "MSBuildToolsPath"; 23 24 /// <summary> 25 /// Name of the property that indicates the X64 tools path 26 /// </summary> 27 internal const string ToolsPath64 = "MSBuildToolsPath64"; 28 29 /// <summary> 30 /// Name of the property that indicates the root of the SDKs folder 31 /// </summary> 32 internal const string SdksPath = "MSBuildSDKsPath"; 33 34 /// <summary> 35 /// Name of the property that indicates that all warnings should be treated as errors. 36 /// </summary> 37 internal const string TreatWarningsAsErrors = "MSBuildTreatWarningsAsErrors"; 38 39 /// <summary> 40 /// Name of the property that indicates a list of warnings to treat as errors. 41 /// </summary> 42 internal const string WarningsAsErrors = "MSBuildWarningsAsErrors"; 43 44 /// <summary> 45 /// Name of the property that indicates the list of warnings to treat as messages. 46 /// </summary> 47 internal const string WarningsAsMessages = "MSBuildWarningsAsMessages"; 48 49 /// <summary> 50 /// The name of the environment variable that users can specify to override where NuGet assemblies are loaded from in the NuGetSdkResolver. 51 /// </summary> 52 internal const string NuGetAssemblyPathEnvironmentVariableName = "MSBUILD_NUGET_PATH"; 53 54 /// <summary> 55 /// The name of the target to run when a user specifies the /restore command-line argument. 56 /// </summary> 57 internal const string RestoreTargetName = "Restore"; 58 /// <summary> 59 /// The most current Visual Studio Version known to this version of MSBuild. 60 /// </summary> 61 internal const string CurrentVisualStudioVersion = "15.0"; 62 63 /// <summary> 64 /// The most current ToolsVersion known to this version of MSBuild. 65 /// </summary> 66 internal const string CurrentToolsVersion = CurrentVisualStudioVersion; 67 68 // if you change the key also change the following clones 69 // Microsoft.Build.OpportunisticIntern.BucketedPrioritizedStringList.TryIntern 70 internal const string MSBuildDummyGlobalPropertyHeader = "MSBuildProjectInstance"; 71 72 /// <summary> 73 /// The most current ToolsVersion known to this version of MSBuild as a Version object. 74 /// </summary> 75 internal static Version CurrentToolsVersionAsVersion = new Version(CurrentToolsVersion); 76 77 /// <summary> 78 /// The most current VSGeneralAssemblyVersion known to this version of MSBuild. 79 /// </summary> 80 internal const string CurrentAssemblyVersion = "15.1.0.0"; 81 82 /// <summary> 83 /// Current version of this MSBuild Engine assembly in the form, e.g, "12.0" 84 /// </summary> 85 internal static string CurrentProductVersion 86 { 87 get 88 { 89 return "15.0"; 90 } 91 } 92 } 93 94 /// <summary> 95 /// Constants naming well-known item metadata. 96 /// </summary> 97 internal static class ItemMetadataNames 98 { 99 internal const string fusionName = "FusionName"; 100 internal const string hintPath = "HintPath"; 101 internal const string assemblyFolderKey = "AssemblyFolderKey"; 102 internal const string alias = "Alias"; 103 internal const string aliases = "Aliases"; 104 internal const string parentFile = "ParentFile"; 105 internal const string privateMetadata = "Private"; 106 internal const string copyLocal = "CopyLocal"; 107 internal const string isRedistRoot = "IsRedistRoot"; 108 internal const string redist = "Redist"; 109 internal const string resolvedFrom = "ResolvedFrom"; 110 internal const string destinationSubDirectory = "DestinationSubDirectory"; 111 internal const string specificVersion = "SpecificVersion"; 112 internal const string link = "Link"; 113 internal const string subType = "SubType"; 114 internal const string executableExtension = "ExecutableExtension"; 115 internal const string embedInteropTypes = "EmbedInteropTypes"; 116 internal const string targetPath = "TargetPath"; 117 internal const string dependentUpon = "DependentUpon"; 118 internal const string msbuildSourceProjectFile = "MSBuildSourceProjectFile"; 119 internal const string msbuildSourceTargetName = "MSBuildSourceTargetName"; 120 internal const string isPrimary = "IsPrimary"; 121 internal const string targetFramework = "RequiredTargetFramework"; 122 internal const string frameworkDirectory = "FrameworkDirectory"; 123 internal const string version = "Version"; 124 internal const string imageRuntime = "ImageRuntime"; 125 internal const string winMDFile = "WinMDFile"; 126 internal const string winMDFileType = "WinMDFileType"; 127 internal const string msbuildReferenceSourceTarget = "ReferenceSourceTarget"; 128 internal const string msbuildReferenceGrouping = "ReferenceGrouping"; 129 internal const string msbuildReferenceGroupingDisplayName = "ReferenceGroupingDisplayName"; 130 internal const string msbuildReferenceFromSDK = "ReferenceFromSDK"; 131 internal const string winmdImplmentationFile = "Implementation"; 132 internal const string projectReferenceOriginalItemSpec = "ProjectReferenceOriginalItemSpec"; 133 internal const string IgnoreVersionForFrameworkReference = "IgnoreVersionForFrameworkReference"; 134 internal const string frameworkFile = "FrameworkFile"; 135 } 136 } 137