Fix dotnet-build.sh
[platform/core/dotnet/build-tools.git] / dotnet / sdk / 2.0.0-preview1-005977 / 15.0 / Microsoft.Common.props
1 <!--\r
2 ***********************************************************************************************\r
3 Microsoft.Common.props\r
4 \r
5 WARNING:  DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have\r
6           created a backup copy.  Incorrect changes to this file will make it\r
7           impossible to load or build your projects from the command-line or the IDE.\r
8 \r
9 Copyright (C) Microsoft Corporation. All rights reserved.\r
10 ***********************************************************************************************\r
11 -->\r
12 \r
13 <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
14   <PropertyGroup>\r
15     <ImportByWildcardBeforeMicrosoftCommonProps Condition="'$(ImportByWildcardBeforeMicrosoftCommonProps)' == ''">true</ImportByWildcardBeforeMicrosoftCommonProps>\r
16     <ImportByWildcardAfterMicrosoftCommonProps Condition="'$(ImportByWildcardAfterMicrosoftCommonProps)' == ''">true</ImportByWildcardAfterMicrosoftCommonProps>\r
17     <ImportUserLocationsByWildcardBeforeMicrosoftCommonProps Condition="'$(ImportUserLocationsByWildcardBeforeMicrosoftCommonProps)' == ''">true</ImportUserLocationsByWildcardBeforeMicrosoftCommonProps>\r
18     <ImportUserLocationsByWildcardAfterMicrosoftCommonProps Condition="'$(ImportUserLocationsByWildcardAfterMicrosoftCommonProps)' == ''">true</ImportUserLocationsByWildcardAfterMicrosoftCommonProps>\r
19     <ImportDirectoryBuildProps Condition="'$(ImportDirectoryBuildProps)' == ''">true</ImportDirectoryBuildProps>\r
20   </PropertyGroup>\r
21 \r
22   <!-- \r
23         Determine the path to the directory build props file if the user did not disable $(ImportDirectoryBuildProps) and\r
24         they did not already specify an absolute path to use via $(DirectoryBuildPropsPath)\r
25     -->\r
26   <PropertyGroup Condition="'$(ImportDirectoryBuildProps)' == 'true' and '$(DirectoryBuildPropsPath)' == ''">\r
27     <_DirectoryBuildPropsFile Condition="'$(_DirectoryBuildPropsFile)' == ''">Directory.Build.props</_DirectoryBuildPropsFile>\r
28     <_DirectoryBuildPropsBasePath Condition="'$(_DirectoryBuildPropsBasePath)' == ''">$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), '$(_DirectoryBuildPropsFile)'))</_DirectoryBuildPropsBasePath>\r
29     <DirectoryBuildPropsPath Condition="'$(_DirectoryBuildPropsBasePath)' != '' and '$(_DirectoryBuildPropsFile)' != ''">$([System.IO.Path]::Combine('$(_DirectoryBuildPropsBasePath)', '$(_DirectoryBuildPropsFile)'))</DirectoryBuildPropsPath>\r
30   </PropertyGroup>\r
31 \r
32   <PropertyGroup Condition="'$(ImportDirectoryBuildProps)' == 'true' and exists('$(DirectoryBuildPropsPath)')">\r
33     <MSBuildAllProjects>$(MSBuildAllProjects);$(DirectoryBuildPropsPath)</MSBuildAllProjects>\r
34   </PropertyGroup>\r
35 \r
36   <Import Project="$(DirectoryBuildPropsPath)" Condition="'$(ImportDirectoryBuildProps)' == 'true' and exists('$(DirectoryBuildPropsPath)')"/>\r
37 \r
38   <!-- \r
39         Prepare to import project extensions which usually come from packages.  Package management systems will create a file at:\r
40           $(MSBuildProjectExtensionsPath)\$(MSBuildProjectFile).<SomethingUnique>.props\r
41           \r
42         Each package management system should use a unique moniker to avoid collisions.  It is a wild-card import so the package\r
43         management system can write out multiple files but the order of the import is alphabetic because MSBuild sorts the list.\r
44     -->\r
45   <PropertyGroup>\r
46     <!--\r
47             The declaration of $(BaseIntermediateOutputPath) had to be moved up from Microsoft.Common.CurrentVersion.targets\r
48             in order for the $(MSBuildProjectExtensionsPath) to use it as a default.\r
49         -->\r
50     <BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">obj\</BaseIntermediateOutputPath>\r
51     <BaseIntermediateOutputPath Condition="!HasTrailingSlash('$(BaseIntermediateOutputPath)')">$(BaseIntermediateOutputPath)\</BaseIntermediateOutputPath>\r
52     <MSBuildProjectExtensionsPath Condition="'$(MSBuildProjectExtensionsPath)' == '' ">$(BaseIntermediateOutputPath)</MSBuildProjectExtensionsPath>\r
53     <!--\r
54         Import paths that are relative default to be relative to the importing file.  However, since MSBuildExtensionsPath\r
55         defaults to BaseIntermediateOutputPath we expect it to be relative to the project directory.  So if the path is relative\r
56         it needs to be made absolute based on the project directory.\r
57       -->\r
58     <MSBuildProjectExtensionsPath Condition="'$([System.IO.Path]::IsPathRooted($(MSBuildProjectExtensionsPath)))' == 'false'">$([System.IO.Path]::Combine('$(MSBuildProjectDirectory)', '$(MSBuildProjectExtensionsPath)'))</MSBuildProjectExtensionsPath>\r
59     <MSBuildProjectExtensionsPath Condition="!HasTrailingSlash('$(MSBuildProjectExtensionsPath)')">$(MSBuildProjectExtensionsPath)\</MSBuildProjectExtensionsPath>\r
60     <ImportProjectExtensionProps Condition="'$(ImportProjectExtensionProps)' == ''">true</ImportProjectExtensionProps>\r
61   </PropertyGroup>\r
62 \r
63   <Import Project="$(MSBuildProjectExtensionsPath)$(MSBuildProjectFile).*.props" Condition="'$(ImportProjectExtensionProps)' == 'true' and exists('$(MSBuildProjectExtensionsPath)')" />\r
64 \r
65   <!-- \r
66         Import wildcard "ImportBefore" props files if we're actually in a 12.0+ project (rather than a project being\r
67         treated as 4.0)\r
68     -->\r
69   <ImportGroup Condition="'$(MSBuildAssemblyVersion)' != ''">\r
70     <!-- \r
71             Wildcard imports come from $(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props.d folder.\r
72             This is very similar to the same extension point used in Microsoft.Common.targets, which is located in\r
73             the $(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.targets\ directory. Unfortunately, there\r
74             is already a file named "Microsoft.Common.props" in this directory so we have to have a slightly different\r
75             directory name to hold extensions.\r
76         -->\r
77     <Import Project="$(MSBuildUserExtensionsPath)\$(MSBuildToolsVersion)\Imports\Microsoft.Common.props\ImportBefore\*" Condition="'$(ImportUserLocationsByWildcardBeforeMicrosoftCommonProps)' == 'true' and exists('$(MSBuildUserExtensionsPath)\$(MSBuildToolsVersion)\Imports\Microsoft.Common.props\ImportBefore')"/>\r
78     <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Imports\Microsoft.Common.props\ImportBefore\*" Condition="'$(ImportByWildcardBeforeMicrosoftCommonProps)' == 'true' and exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Imports\Microsoft.Common.props\ImportBefore')"/>\r
79   </ImportGroup>\r
80 \r
81   <!-- \r
82         In VS 2010 SP1 and VS 2012, both supported for asset compatibility, the MSBuild installed \r
83         as part of them did not enforce using the local ToolsVersion (4.0) in all cases, but instead \r
84         just used whatever ToolsVersion was in the project file if it existed on the machine, and \r
85         only forced 4.0 if that ToolsVersion did not exist.  \r
86 \r
87         Moving forward, we do want to enforce a single acting ToolsVersion per version of Visual Studio, \r
88         but in order to approximate this behavior on VS 2010 SP1 and VS 2012 as well, we've redirected \r
89         the targets:  If we're building using 4.X MSBuild (which doesn't define the new reserved \r
90         property, MSBuildAssemblyVersion), we'll point right back at the 4.0 targets, which still exist \r
91         as part of the .NET Framework.  Only if we're using the new MSBuild will we point to the current\r
92         targets. \r
93    -->\r
94   <PropertyGroup Condition="'$(MSBuildAssemblyVersion)' == '' and ('$(VisualStudioVersion)' != '' and '$(VisualStudioVersion)' &gt;= '12.0')">\r
95     <!--\r
96            Reset VisualStudioVersion if it's 12.0+: Should be 10.0 if VS 2010 is installed or 11.0 otherwise, \r
97            but since we don't have a good way of telling whether VS 2010 is installed, make it 11.0 if \r
98            VS 2012 is installed or 10.0 otherwise.  The reset should be safe because if it was already \r
99            set to something (e.g. 11.0 in a VS 2012 command prompt) then MSBuild's internal \r
100            VisualStudioVersion-defaulting code should never come into the picture, so the only way it could \r
101            be 12.0+ when building a TV 12.0 project (because we're in this file) using MSBuild 4.5 (because \r
102            MSBuildAssemblyVersion hasn't been set) is if it's a TV 12.0 project on an empty command prompt. \r
103       -->\r
104     <VisualStudioVersion Condition="Exists('$(MSBuildExtensionsPath)\4.0\Microsoft.Common.props')">11.0</VisualStudioVersion>\r
105     <VisualStudioVersion Condition="!Exists('$(MSBuildExtensionsPath)\4.0\Microsoft.Common.props')">10.0</VisualStudioVersion>\r
106   </PropertyGroup>\r
107 \r
108   <!-- If building using 4.X MSBuild, we want to act like this project is TV 4.0, so override \r
109          the custom extensibility target locations with the hard-coded 4.0 equivalent. -->\r
110   <PropertyGroup Condition="'$(MSBuildAssemblyVersion)' == ''">\r
111     <CustomBeforeMicrosoftCommonProps Condition="'$(CustomBeforeMicrosoftCommonProps)'==''">$(MSBuildExtensionsPath)\v4.0\Custom.Before.$(MSBuildThisFile)</CustomBeforeMicrosoftCommonProps>\r
112     <CustomAfterMicrosoftCommonProps Condition="'$(CustomAfterMicrosoftCommonProps)'==''">$(MSBuildExtensionsPath)\v4.0\Custom.After.$(MSBuildThisFile)</CustomAfterMicrosoftCommonProps>\r
113   </PropertyGroup>\r
114 \r
115   <!-- If building using 4.X MSBuild, we want to act like this project is TV 4.0, so import\r
116          Microsoft.Common.props from the 4.0 location, and make sure everything else in here is \r
117          set up such that if it's defaulted to something there, it won't be overridden here. -->\r
118   <Import Project="$(MSBuildExtensionsPath)\4.0\Microsoft.Common.props" Condition="'$(MSBuildAssemblyVersion)' == '' and Exists('$(MSBuildExtensionsPath)\4.0\Microsoft.Common.props')" />\r
119 \r
120   <PropertyGroup>\r
121     <CustomBeforeMicrosoftCommonProps Condition="'$(CustomBeforeMicrosoftCommonProps)'==''">$(MSBuildExtensionsPath)\v$(MSBuildToolsVersion)\Custom.Before.$(MSBuildThisFile)</CustomBeforeMicrosoftCommonProps>\r
122     <CustomAfterMicrosoftCommonProps Condition="'$(CustomAfterMicrosoftCommonProps)'==''">$(MSBuildExtensionsPath)\v$(MSBuildToolsVersion)\Custom.After.$(MSBuildThisFile)</CustomAfterMicrosoftCommonProps>\r
123   </PropertyGroup>\r
124 \r
125   <!-- \r
126          Only import the extension targets if we're actually in a 12.0 project here (rather than one we're attempting \r
127          to treat as 4.0) OR if the Dev11 Microsoft.Common.props don't exist.  If it's a 12.0 project we're redirecting \r
128          to 4.0 and the Dev11 Microsoft.Common.props do exist, the extension targets will have been imported already \r
129          so there's no need to import them twice.\r
130      -->\r
131   <Import Project="$(CustomBeforeMicrosoftCommonProps)" Condition="'$(CustomBeforeMicrosoftCommonProps)' != '' and Exists('$(CustomBeforeMicrosoftCommonProps)') and ('$(MSBuildAssemblyVersion)' != '' or !Exists('$(MSBuildExtensionsPath)\4.0\Microsoft.Common.props'))" />\r
132 \r
133   <!-- This is used to determine whether Microsoft.Common.targets needs to import \r
134          Microsoft.Common.props itself, or whether it has been imported previously,\r
135          e.g. by the project itself. -->\r
136   <PropertyGroup>\r
137     <MicrosoftCommonPropsHasBeenImported>true</MicrosoftCommonPropsHasBeenImported>\r
138   </PropertyGroup>\r
139 \r
140   <PropertyGroup>\r
141     <Configuration Condition=" '$(Configuration)' == '' and '$(DefaultProjectConfiguration)' != '' ">$(DefaultProjectConfiguration)</Configuration>\r
142     <Platform Condition=" '$(Platform)' == '' and '$(DefaultProjectPlatform)' != '' ">$(DefaultProjectPlatform)</Platform>\r
143   </PropertyGroup>\r
144 \r
145   <PropertyGroup>\r
146     <WMSJSProject Condition="'$(WMSJSProject)' == ''">WJProject</WMSJSProject>\r
147     <WMSJSProjectDirectory Condition="'$(WMSJSProjectDirectory)' == ''">JavaScript</WMSJSProjectDirectory>\r
148   </PropertyGroup>\r
149 \r
150   <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.VisualStudioVersion.v*.Common.props" Condition="'$(VisualStudioVersion)' == ''" />\r
151 \r
152   <!-- \r
153          Only import the extension targets if we're actually in a 12.0 project here (rather than one we're attempting \r
154          to treat as 4.0) OR if the Dev11 Microsoft.Common.props don't exist.  If it's a 12.0 project we're redirecting \r
155          to 4.0 and the Dev11 Microsoft.Common.props do exist, the extension targets will have been imported already \r
156          so there's no need to import them twice.\r
157      -->\r
158   <Import Project="$(CustomAfterMicrosoftCommonProps)" Condition="'$(CustomAfterMicrosoftCommonProps)' != '' and Exists('$(CustomAfterMicrosoftCommonProps)') and ('$(MSBuildAssemblyVersion)' != '' or !Exists('$(MSBuildExtensionsPath)\4.0\Microsoft.Common.props'))" />\r
159 \r
160   <!-- \r
161         Import wildcard "ImportAfter" props files if we're actually in a 12.0+ project (rather than a project being\r
162         treated as 4.0)\r
163     -->\r
164   <ImportGroup Condition="'$(MSBuildAssemblyVersion)' != ''">\r
165     <Import Project="$(MSBuildUserExtensionsPath)\$(MSBuildToolsVersion)\Imports\Microsoft.Common.props\ImportAfter\*" Condition="'$(ImportUserLocationsByWildcardAfterMicrosoftCommonProps)' == 'true' and exists('$(MSBuildUserExtensionsPath)\$(MSBuildToolsVersion)\Imports\Microsoft.Common.props\ImportAfter')"/>\r
166     <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Imports\Microsoft.Common.props\ImportAfter\*" Condition="'$(ImportByWildcardAfterMicrosoftCommonProps)' == 'true' and exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Imports\Microsoft.Common.props\ImportAfter')"/>\r
167   </ImportGroup>\r
168 </Project>\r