|
9 | 9 | </MSBuildAllProjects>
|
10 | 10 | </PropertyGroup>
|
11 | 11 |
|
| 12 | + <!-- for root paths --> |
12 | 13 | <PropertyGroup>
|
13 | 14 | <BuildRoot>$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), build.root))</BuildRoot>
|
14 | 15 | <TargetsPath>$(BuildRoot)\Build</TargetsPath>
|
15 | 16 | <OsVersion>$(registry:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion@CurrentVersion)</OsVersion>
|
| 17 | + <!--If Dev10 and Dev11 are both installed, the default is to build Dev11. This can be overridden by setting the DevToolsVersion variable in powershell--> |
| 18 | + <DevToolsVersion Condition="'$(DevToolsVersion)' == '' And '$(VS110COMNTOOLS)' != ''">110</DevToolsVersion> |
| 19 | + <DevToolsVersion Condition="'$(DevToolsVersion)' == '' And '$(VS100COMNTOOLS)' != ''">100</DevToolsVersion> |
16 | 20 | </PropertyGroup>
|
17 | 21 |
|
18 |
| - <Target Name="CopyToOutputDirectoryAlwaysError" |
19 |
| - Condition="'@(Content)'!='' or '@(None)'!=''"> |
20 |
| - <Error Condition="'%(Content.CopyToOutputDirectory)'=='Always'" Text="CopyToOutputDirectory is not allowed to be 'Always'. Use 'PreserveNewest' instead." File="$(MSBuildProjectFile)" /> |
21 |
| - <Error Condition="'%(None.CopyToOutputDirectory)'=='Always'" Text="CopyToOutputDirectory is not allowed to be 'Always'. Use 'PreserveNewest' instead." File="$(MSBuildProjectFile)" /> |
22 |
| - </Target> |
23 | 22 |
|
| 23 | + <!-- paths can be overriden by configuration --> |
| 24 | + <PropertyGroup> |
| 25 | + <OutputPath>$(BuildRoot)\Binaries\$(Platform)\$(Configuration)\</OutputPath> |
| 26 | + <OutDir>$(OutputPath)</OutDir> |
| 27 | + <MSBuildCommunityTasksPath Condition="'$(MSBuildCommunityTasksPath)'==''">$(BuildRoot)\Build\MSBuild.Community.Tasks</MSBuildCommunityTasksPath> |
| 28 | + <WixToolPath Condition="'$(WixToolPath)'==''">$(BuildRoot)\Build\Wix\3.6\</WixToolPath> |
| 29 | + <WixExtDir Condition="'$(WixExtDir)'==''">$(WixToolPath)</WixExtDir> |
| 30 | + <TestRoot>$(BuildRoot)\Release\Tests</TestRoot> |
| 31 | + <CasablancaSrcDir>$(BuildRoot)\Release\src</CasablancaSrcDir> |
| 32 | + <CasablancaIncludeDir>$(BuildRoot)\Release\include</CasablancaIncludeDir> |
| 33 | + <CollateralsDir>$(BuildRoot)\Release\Collateral</CollateralsDir> |
| 34 | + </PropertyGroup> |
| 35 | + |
| 36 | + <!-- try locating configuration file --> |
24 | 37 | <Import Condition="Exists('$(BuildRoot)\..\Build\environment.casablanca.settings')" Project="$(BuildRoot)\..\Build\environment.casablanca.settings"/>
|
| 38 | + |
| 39 | + <!-- paths will not be overriden --> |
| 40 | + <PropertyGroup> |
| 41 | + <OutDir Condition="'$(OutDir)' != '' and !HasTrailingSlash('$(OutDir)')">$(OutDir)\</OutDir> |
| 42 | + </PropertyGroup> |
| 43 | + |
| 44 | + <PropertyGroup Condition="'$(DevToolsVersion)' == '100'"> <PlatformToolset>v100</PlatformToolset> |
| 45 | + <DevEnvDir>$(VS100COMNTOOLS)..\IDE</DevEnvDir> |
| 46 | + </PropertyGroup> |
| 47 | + |
| 48 | + <PropertyGroup Condition="'$(DevToolsVersion)' == '110'"> |
| 49 | + <DevEnvDir>$(VS110COMNTOOLS)..\IDE</DevEnvDir> |
| 50 | + </PropertyGroup> |
| 51 | + |
25 | 52 | <PropertyGroup>
|
26 | 53 | <BinaryDependencies>$(TargetsPath)\BinaryDependencies</BinaryDependencies>
|
27 | 54 | <Configuration Condition="'$(Configuration)'==''">Debug</Configuration>
|
28 | 55 | <Platform Condition="'$(Platform)'==''">Win32</Platform>
|
29 | 56 | <ErrorReport>prompt</ErrorReport>
|
30 | 57 | <WarningLevel>4</WarningLevel>
|
31 | 58 |
|
32 |
| - <MSBuildCommunityTasksPath Condition="'$(MSBuildCommunityTasksPath)'==''">$(BuildRoot)\Build\MSBuild.Community.Tasks</MSBuildCommunityTasksPath> |
33 |
| - <WixToolPath Condition="'$(WixToolPath)'==''">$(BuildRoot)\Build\Wix\3.6\</WixToolPath> |
34 |
| - <WixExtDir Condition="'$(WixExtDir)'==''">$(WixToolPath)</WixExtDir> |
35 | 59 | <WixTargetsPath>$(WixToolPath)Wix.targets</WixTargetsPath>
|
36 | 60 | <WixTasksPath >$(WixToolPath)WixTasks.dll</WixTasksPath>
|
37 | 61 | <LuxTargetsPath>$(WixToolPath)Lux.targets</LuxTargetsPath>
|
38 | 62 | <LuxTasksPath >$(WixToolPath)LuxTasks.dll</LuxTasksPath>
|
39 | 63 |
|
40 |
| - <!--If Dev10 and Dev11 are both installed, the default is to build Dev11. This can be overridden by setting the DevToolsVersion variable in powershell--> |
41 |
| - <DevToolsVersion Condition="'$(DevToolsVersion)' == '' And '$(VS110COMNTOOLS)' != ''">110</DevToolsVersion> |
42 |
| - <DevToolsVersion Condition="'$(DevToolsVersion)' == '' And '$(VS100COMNTOOLS)' != ''">100</DevToolsVersion> |
43 |
| - |
44 |
| - <TestRoot>$(BuildRoot)\Release\Tests</TestRoot> |
45 |
| - <CasablancaSrcDir>$(BuildRoot)\Release\src</CasablancaSrcDir> |
46 |
| - <CasablancaIncludeDir>$(BuildRoot)\Release\include</CasablancaIncludeDir> |
47 |
| - <CollateralsDir>$(BuildRoot)\Release\Collateral</CollateralsDir> |
48 | 64 |
|
49 | 65 | <!--For C#:-->
|
50 | 66 | <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
|
|
63 | 79 | <WholeProgramOptimization Condition="'$(WholeProgramOptimization)'=='' And '$(Configuration)'!='Debug'">true</WholeProgramOptimization>
|
64 | 80 | </PropertyGroup>
|
65 | 81 |
|
66 |
| - <PropertyGroup Condition="'$(DevToolsVersion)' == '100'"> <PlatformToolset>v100</PlatformToolset> |
67 |
| - <DevEnvDir>$(VS100COMNTOOLS)..\IDE</DevEnvDir> |
68 |
| - </PropertyGroup> |
69 |
| - |
70 |
| - <PropertyGroup Condition="'$(DevToolsVersion)' == '110'"> |
71 |
| - <DevEnvDir>$(VS110COMNTOOLS)..\IDE</DevEnvDir> |
72 |
| - </PropertyGroup> |
73 | 82 |
|
74 |
| - <!--For Incubation only:--> |
75 |
| - <PropertyGroup> |
76 |
| - <ActorsIncludeDir>$(BuildRoot)\Incubation\Actors\include</ActorsIncludeDir> |
77 |
| - <ActorsInternalIncludeDir>$(BuildRoot)\Incubation\Actors\internalinc</ActorsInternalIncludeDir> |
78 |
| - </PropertyGroup> |
79 |
| - |
80 | 83 | <ItemDefinitionGroup>
|
81 | 84 | <ClCompile>
|
82 | 85 | <WarningLevel>Level4</WarningLevel>
|
|
146 | 149 | <DebugSymbols>true</DebugSymbols>
|
147 | 150 | <DebugType>full</DebugType>
|
148 | 151 | <Optimize>false</Optimize>
|
149 |
| - <OutputPath>$(BuildRoot)\Binaries\Win32\Debug\</OutputPath> |
150 | 152 | <DefineConstants>DEBUG;TRACE</DefineConstants>
|
151 | 153 | <InstallerPlatform>x86</InstallerPlatform>
|
152 | 154 | </PropertyGroup>
|
|
155 | 157 | <DebugSymbols>true</DebugSymbols>
|
156 | 158 | <DebugType>full</DebugType>
|
157 | 159 | <Optimize>false</Optimize>
|
158 |
| - <OutputPath>$(BuildRoot)\Binaries\x64\Debug\</OutputPath> |
159 | 160 | <DefineConstants>DEBUG;TRACE;X64</DefineConstants>
|
160 | 161 | </PropertyGroup>
|
161 | 162 |
|
162 | 163 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|Win32' ">
|
163 | 164 | <DebugType>pdbonly</DebugType>
|
164 | 165 | <Optimize>true</Optimize>
|
165 |
| - <OutputPath>$(BuildRoot)\Binaries\Win32\Release\</OutputPath> |
166 | 166 | <DefineConstants>TRACE</DefineConstants>
|
167 | 167 | <InstallerPlatform>x86</InstallerPlatform>
|
168 | 168 | </PropertyGroup>
|
169 | 169 |
|
170 | 170 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
|
171 | 171 | <DebugType>pdbonly</DebugType>
|
172 | 172 | <Optimize>true</Optimize>
|
173 |
| - <OutputPath>$(BuildRoot)\Binaries\x64\Release\</OutputPath> |
174 | 173 | <DefineConstants>TRACE;X64</DefineConstants>
|
175 | 174 | </PropertyGroup>
|
176 | 175 |
|
177 | 176 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|ARM' ">
|
178 | 177 | <DebugSymbols>true</DebugSymbols>
|
179 | 178 | <DebugType>full</DebugType>
|
180 | 179 | <Optimize>false</Optimize>
|
181 |
| - <OutputPath>$(BuildRoot)\Binaries\ARM\Debug\</OutputPath> |
182 | 180 | <DefineConstants>DEBUG;TRACE;ARM</DefineConstants>
|
183 | 181 | </PropertyGroup>
|
184 | 182 |
|
185 | 183 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|ARM' ">
|
186 | 184 | <DebugType>pdbonly</DebugType>
|
187 | 185 | <Optimize>true</Optimize>
|
188 |
| - <OutputPath>$(BuildRoot)\Binaries\ARM\Release\</OutputPath> |
189 | 186 | <DefineConstants>TRACE;ARM</DefineConstants>
|
190 | 187 | </PropertyGroup>
|
191 | 188 |
|
192 |
| - <PropertyGroup> |
193 |
| - <OutDir Condition="'$(OutDir)' == ''">$(OutputPath)</OutDir> |
194 |
| - </PropertyGroup> |
195 |
| - |
196 |
| - <PropertyGroup> |
197 |
| - <OutDir Condition="'$(OutDir)' != '' and !HasTrailingSlash('$(OutDir)')">$(OutDir)\</OutDir> |
198 |
| - </PropertyGroup> |
199 |
| - |
200 |
| - <ItemGroup> |
201 |
| - <CodeAnalysisDictionary Include="$(BuildRoot)\Build\CustomDictionary.xml" /> |
202 |
| - </ItemGroup> |
203 | 189 |
|
| 190 | + |
| 191 | + <!--end paths configuration --> |
| 192 | + <Target Name="CopyToOutputDirectoryAlwaysError" |
| 193 | + Condition="'@(Content)'!='' or '@(None)'!=''"> |
| 194 | + <Error Condition="'%(Content.CopyToOutputDirectory)'=='Always'" Text="CopyToOutputDirectory is not allowed to be 'Always'. Use 'PreserveNewest' instead." File="$(MSBuildProjectFile)" /> |
| 195 | + <Error Condition="'%(None.CopyToOutputDirectory)'=='Always'" Text="CopyToOutputDirectory is not allowed to be 'Always'. Use 'PreserveNewest' instead." File="$(MSBuildProjectFile)" /> |
| 196 | + </Target> |
204 | 197 | <!-- BEGIN: Workaround for MSBuild.exe bug that will be fixed in v4.5 -->
|
205 | 198 | <!-- Bug Symptom: -->
|
206 | 199 | <!-- Multi-proc build returns "CSC : fatal error CS0009: Metadata file '(FilePath)' could not be opened == 'File is corrupt.' -->
|
|
0 commit comments