forked from microsoft/ApplicationInsights-dotnet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Directory.Build.props
102 lines (86 loc) · 7.71 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
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- This file (Directory.Build.props) is automatically included by MSBuild into all projects in this solution. -->
<!-- It defines common build paths and infrastructure. -->
<!-- Other products / repositories using the same build pattern will have their own copy of copy this file -->
<Import Project=".\GlobalStaticVersion.props" />
<PropertyGroup>
<!-- The common project structure looks like this: -->
<!-- d:\DDGit\ -->
<!-- ServiceFoo\ -->
<!-- Bin\ -->
<!-- Obj\ -->
<!-- Packages\ -->
<!-- Src\ -->
<!-- .git\ -->
<!-- .nuget\ -->
<!-- Directory.Build.props (this file) -->
<!-- SomeProjectFolderA\ -->
<!-- NuGet.config -->
<!-- SomeProjectA.sln -->
<!-- ... -->
<!-- SomeProjectFolderB\ -->
<!-- ... -->
<!-- EnlistmentRoot.marker -->
<!-- ServiceBar\ -->
<!-- Bin\ -->
<!-- Obj\ -->
<!-- Packages\ -->
<!-- Src\ -->
<!-- ... -->
<!-- -->
<!-- The Bin folder contains ALL build output. -->
<!-- The Obj folder contains all intermediate build files (like the obj folder). -->
<!-- The Packages folder contains ALL packages downloaded by NuGet. -->
<!-- The above folders contain NOTHING that is checked in (they are not checked in themselves). -->
<!-- The Src folder contains EVERHYTHNG that is checked in and ALL that is checked in. -->
<!-- No build output or temp files should end up in the Src folder! (barring a few *small* VS temporaries) -->
<!-- -->
<!-- Src MUST contain the EnlistmentRoot.marker file which marks the EnlistmentRoot. -->
<!-- Src also contains the NuGet.config file which ensures that NuGet uses the NuGet.Packages folder. -->
<EnlistmentRoot>$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), 'EnlistmentRoot.marker'))</EnlistmentRoot>
<BinRoot>$(EnlistmentRoot)\..\bin</BinRoot>
<BinRoot>$([System.IO.Path]::GetFullPath( $(BinRoot) ))</BinRoot>
<RelativeOutputPathBase>$(MSBuildProjectDirectory.Substring($(EnlistmentRoot.Length)))</RelativeOutputPathBase>
<BaseIntermediateOutputPath>$(EnlistmentRoot)\..\obj\$(MSBuildProjectName)</BaseIntermediateOutputPath>
<BaseIntermediateOutputPath>$([System.IO.Path]::GetFullPath( $(BaseIntermediateOutputPath) ))</BaseIntermediateOutputPath>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<OutputPath>$(BinRoot)\$(Configuration)\$(RelativeOutputPathBase)</OutputPath>
<OutputPath>$([System.IO.Path]::GetFullPath( $(OutputPath) ))\</OutputPath>
<!-- Collect all NuGet packages in the same folder for convenience during testing -->
<PackageOutputDir>$(BinRoot)\$(Configuration)\NuGet</PackageOutputDir>
<PackageOutputPath>$(PackageOutputDir)</PackageOutputPath>
<AppxPackageDir>$(OutputPath)</AppxPackageDir>
<IntermediateOutputPath>$(BaseIntermediateOutputPath)\$(Configuration)\$(RelativeOutputPathBase)</IntermediateOutputPath>
<IntermediateOutputPath>$([System.IO.Path]::GetFullPath( $(IntermediateOutputPath) ))\</IntermediateOutputPath>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">$(EnlistmentRoot)\</SolutionDir>
<PackagesDir>$(EnlistmentRoot)\..\packages</PackagesDir>
<PackagesDir>$([System.IO.Path]::GetFullPath( $(PackagesDir) ))</PackagesDir>
<!-- Forces EventRegister target to generate ETW manifest file -->
<EtwManifestForceAll Condition="$(OS) == 'Windows_NT'">true</EtwManifestForceAll>
<EtwManifestOutDir>$(BinRoot)\$(Configuration)\ETW\$(TargetFramework)\</EtwManifestOutDir>
</PropertyGroup>
<PropertyGroup>
<!-- Enable NuGet package restore during build -->
<RestorePackages>true</RestorePackages>
<RequireRestoreConsent>false</RequireRestoreConsent>
</PropertyGroup>
<!-- Generate AssemblyFileVersion and AssemblyVersion attributes. -->
<PropertyGroup>
<!-- Turn on dynamic assembly attribute generation -->
<AssemblyAttributesPath>$(IntermediateOutputPath)\AssemblyInfo.g.cs</AssemblyAttributesPath>
<GenerateAdditionalSources>true</GenerateAdditionalSources>
</PropertyGroup>
<ItemGroup>
<!--
AssemblyVersion and AssemblyFileVersion attributes are generated automatically for every build.
NuGet package version is derived from AssemblyFileVersion.
-->
<AssemblyAttributes Include="AssemblyVersion">
<_Parameter1>$(SemanticVersionMajor).$(SemanticVersionMinor).$(SemanticVersionPatch).0</_Parameter1>
</AssemblyAttributes>
<AssemblyAttributes Include="AssemblyFileVersion">
<_Parameter1>$(SemanticVersionMajor).$(SemanticVersionMinor).$(SemanticVersionPatch).$(PreReleaseVersion)</_Parameter1>
</AssemblyAttributes>
</ItemGroup>
</Project>