-
Notifications
You must be signed in to change notification settings - Fork 30
/
Directory.Build.props
165 lines (147 loc) · 7.32 KB
/
Directory.Build.props
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
<?xml version="1.0" encoding="utf-8"?>
<!--
This root MSBuild file should be imported by all projects in the tree and serves as the central entry point for CBT.
You can have a hierarchy of imports but make sure that this file is still imported.
-->
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Global locations">
<!--
$(MSBuildAllProjects) is a list of files that determine if a project is up-to-date or not. By including this
file in the list, it ensures that all projects will be rebuilt if it changes.
-->
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
<!--
Enlistment root is based off of wherever this file is. Be sure not to set this property anywhere else.
-->
<EnlistmentRoot>$(MSBuildThisFileDirectory.TrimEnd('\\'))</EnlistmentRoot>
<NuGetPackagesPath Condition=" '$(NuGetPackagesPath)' == '' ">$(EnlistmentRoot)\packages</NuGetPackagesPath>
<!--
Enable CBT.DotNetFx-net452 build package to be used globally
-->
<!-- <EnableCBT_DotNetFx-net452>true</EnableCBT_DotNetFx-net452> -->
<!--
Set a default TargetFrameworkVersion if needed
<TargetFrameworkVersion Condition=" '$(TargetFrameworkVersion)' == '' ">v4.5.2</TargetFrameworkVersion>
-->
</PropertyGroup>
<!--
StyleCop.json and Code Analysis Custom Dictionary settings
-->
<ItemGroup Condition="Exists('$(SRCROOT)\stylecop.json') and Exists('$(SRCROOT)\CustomDictionary.xml')" >
<AdditionalFiles Include="$(SRCROOT)\stylecop.json" />
<CodeAnalysisDictionary Include="$(SRCROOT)\CustomDictionary.xml">
<Link>CustomDictionary.xml</Link>
</CodeAnalysisDictionary>
</ItemGroup>
<PropertyGroup>
<RunCodeAnalysis>False</RunCodeAnalysis>
<CodeAnalysisSummary>true</CodeAnalysisSummary>
<CodeAnalysisTimeout>300</CodeAnalysisTimeout>
<CodeAnalysisTreatWarningsAsErrors>false</CodeAnalysisTreatWarningsAsErrors>
<CodeAnalysisSearchGlobalAssemblyCache>false</CodeAnalysisSearchGlobalAssemblyCache>
</PropertyGroup>
<!--
Nuproj ProjectReference dependency assembly resolution
-->
<PropertyGroup Condition=" '$(MSBuildProjectExtension)' != '.nuproj' And !Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.targets\ImportAfter\Microsoft.Common.NuProj.targets') ">
<EnableNuProj_Common Condition=" '$(EnableNuProj_Common)' == '' ">true</EnableNuProj_Common>
</PropertyGroup>
<!--
Importing the "global" CBT build.props is what activates CBT.Core to restore modules. You will want to set
properties before or after it depending on what you're injecting. The "global" build.props will also import
files located in the $(CBTLocalPath) folder at certain points.
-->
<Import Project="$(EnlistmentRoot)\.build\CBT\build.props" />
<!--
The NuProjPath property allows .nuproj projects to build without having NuProj installed.
-->
<PropertyGroup Condition=" '$(MSBuildProjectExtension)' == '.nuproj'" >
<NuProjPath Condition=" Exists('$(MSBuildExtensionsPath)\NuProj\NuProj.props') ">$(MSBuildExtensionsPath)\NuProj</NuProjPath>
<NuProjPath Condition=" '$(CBTModule_NuProj)' != '' And '$(NuProjPath)' == '' ">$(CBTModule_NuProj)\tools</NuProjPath>
<!-- Whenever a project manually imports Directory.Build.props and it could be imported again by Microsoft.Common.props, you set ImportDirectoryBuildProps to false -->
<ImportDirectoryBuildProps>false</ImportDirectoryBuildProps>
</PropertyGroup>
<PropertyGroup>
<!-- The root folder to stage the outputs at -->
<StagingOutputRootPath>$(EnlistmentRoot)\out\$(Configuration)-$(Platform)\</StagingOutputRootPath>
</PropertyGroup>
<PropertyGroup>
<OutputPath>$(StagingOutputRootPath)$(MSBuildProjectName)\</OutputPath>
<OutIncludePath>$(StagingOutputRootPath)include</OutIncludePath>
<VCToolsVersion>14.15.26726</VCToolsVersion>
<WindowsTargetPlatformVersion>10.0.16299.0</WindowsTargetPlatformVersion>
<PlatformToolset>v141</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
<OutDir>$(OutputPath)</OutDir>
<ResolveNugetpackages>false</ResolveNugetpackages>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Debug'">
<UseDebugLibraries>true</UseDebugLibraries>
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Release'">
<UseDebugLibraries>false</UseDebugLibraries>
<LinkIncremental>false</LinkIncremental>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<ConformanceMode>true</ConformanceMode>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<DisableSpecificWarnings>26439</DisableSpecificWarnings>
</ClCompile>
<Link>
<AdditionalDependencies>;%(AdditionalDependencies)</AdditionalDependencies>
<SubSystem>Windows</SubSystem>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)'=='Debug'">
<ClCompile>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<GenerateDebugInformation>true</GenerateDebugInformation>
</ClCompile>
<Link>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)'=='Release'">
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<GenerateDebugInformation>true</GenerateDebugInformation>
</ClCompile>
<Link>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Platform)'=='Win32'">
<ClCompile>
<PreprocessorDefinitions>WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
</Link>
</ItemDefinitionGroup>
<Target Name="CopyFilesToStagingOutputDirectory" AfterTargets="CopyFilesToOutputDirectory" Condition=" '$(StagingOutputPath)' != '' ">
<ItemGroup>
<!-- Gather all files in the output directory recursively -->
<StagingFiles Include="$(OutputPath)\$(OutFileType)" />
</ItemGroup>
<!-- Copy the build output to the drop staging location -->
<Copy
SourceFiles="@(StagingFiles)"
DestinationFolder="$(StagingOutputRootPath)\$(StagingOutputPath)"
SkipUnchangedFiles="$(SkipCopyUnchangedFiles)"
OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)"
Retries="$(CopyRetryCount)"
RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"
UseHardlinksIfPossible="$(CreateHardLinksForCopyFilesToOutputDirectoryIfPossible)"
UseSymboliclinksIfPossible="$(CreateSymbolicLinksForCopyFilesToOutputDirectoryIfPossible)">
<Output TaskParameter="DestinationFiles" ItemName="FileWrites"/>
</Copy>
</Target>
<!-- NuProj.props sets a default TargetFrameworkVersion if none is set. Import this before any DotNetFx module props/targets that rely on TargetFrameworkVersion. -->
<!-- <Import Project="$(NuProjPath)\NuProj.props" Condition="Exists('$(NuProjPath)\NuProj.props') AND '$(MSBuildProjectExtension)' == '.nuproj'" /> -->
</Project>