Skip to content

Commit

Permalink
Define common compile properties
Browse files Browse the repository at this point in the history
Defined important compile properties like Optimize, DebugType, DefineConstants in top-level build.props.

Fixes Azure#29
  • Loading branch information
jaredmoo committed Aug 28, 2015
1 parent 052f305 commit 5e30435
Showing 1 changed file with 27 additions and 7 deletions.
34 changes: 27 additions & 7 deletions build.props
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,39 @@
<StandaloneBuild Condition="!Exists('$(MSBuildThisFileDirectory)\..\Build.props')">true</StandaloneBuild>
<StandaloneBuild Condition="Exists('$(MSBuildThisFileDirectory)\..\Build.props')">false</StandaloneBuild>
</PropertyGroup>

<!--
Properties that are implicitly defined in the Microsoft Azure SQL Database team's build system
that need to be defined here for standalone build to work.
-->
<PropertyGroup Condition="'$(StandaloneBuild)' == 'true'">
<!--
Properties that are implicitly defined in the Microsoft Azure SQL Database team's build system
that need to be defined here for standalone build to work.
-->
<BaseIntermediateOutputPath>$(MSBuildThisFileDirectory)\obj\$(MSBuildProjectFile)</BaseIntermediateOutputPath>
<BaseOutputPath>$(MSBuildThisFileDirectory)\bin</BaseOutputPath>
<OutputPath>$(BaseOutputPath)\$(Configuration)\$(AssemblyName)</OutputPath>
<!-- Common compile properties -->
<ErrorReport Condition="'$(ErrorReport)' == ''">prompt</ErrorReport>
<WarningLevel Condition="'$(WarningLevel)' == ''">4</WarningLevel>
<DefineConstants>$(DefineConstants);STANDALONE_BUILD</DefineConstants>
<TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
<TargetFrameworkProfile />
<Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>

<!-- Folder layout properties -->
<BaseIntermediateOutputPath>$(MSBuildThisFileDirectory)\obj\$(MSBuildProjectFile)</BaseIntermediateOutputPath>
<BaseOutputPath>$(MSBuildThisFileDirectory)\bin</BaseOutputPath>
<OutputPath>$(BaseOutputPath)\$(Configuration)\$(AssemblyName)</OutputPath>
<NugetPack>$(MSBuildThisFileDirectory)\packages</NugetPack>
</PropertyGroup>
<PropertyGroup Condition="'$(StandaloneBuild)' == 'true' and '$(Configuration)' == 'Debug'">
<!-- Debug compile properties -->
<Optimize Condition="'$(Optimize)' == ''">false</Optimize>
<DebugType Condition="'$(DebugType)' == ''">full</DebugType>
<DefineConstants>$(DefineConstants),DEBUG,TRACE,CODE_ANALYSIS</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(StandaloneBuild)' == 'true' and ('$(Configuration)' == 'Release' or '$(Configuration)' == 'Cover')">
<!-- Release compile properties -->
<Optimize Condition="'$(Optimize)' == ''">true</Optimize>
<DebugType Condition="'$(DebugType)' == ''">pdbonly</DebugType>
<DefineConstants>$(DefineConstants),TRACE</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition="'$(StandaloneBuild)' == 'false'">
<!-- Enable flag that sets the version number of the built assemblies. -->
<EnableElasticScaleClientHardcodedVersioning>true</EnableElasticScaleClientHardcodedVersioning>
Expand Down

0 comments on commit 5e30435

Please sign in to comment.