-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDirectory.Build.Default.props
112 lines (96 loc) · 5.69 KB
/
Directory.Build.Default.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
<!-- Defines the default metadata for .NET projects (prolog) -->
<Project InitialTargets="TraceDirectoryBuildDefaultProps">
<Import Project="zou.props" Condition="'$(ZouImported)' == ''" />
<Import Project="TargetFramework.props" Condition="'$(TargetFrameworkImported)' == ''" />
<!-- Default properties (can be overloaded in bundle after importing this script) -->
<PropertyGroup>
<Company Condition="'$(Company)' == ''">Epsitec</Company>
</PropertyGroup>
<!-- Debug info-->
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<DebugType>full</DebugType>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<DebugType>pdbonly</DebugType>
</PropertyGroup>
<!-- MSBuild -->
<PropertyGroup>
<!--<MSBuildWarningsAsMessages>MSB3277</MSBuildWarningsAsMessages>-->
</PropertyGroup>
<!-- Compiler -->
<PropertyGroup>
<!--
Use the C# language version associated with the target framework in use
https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-options/language#langversion
https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/configure-language-version#defaults
-->
<LangVersion Condition="'$(LangVersion)' == ''">latest</LangVersion>
<!--
<LangVersion Condition="$(CoreTargetFramework.StartsWith('net6'))">10.0</LangVersion>
<LangVersion Condition="$(CoreTargetFramework.StartsWith('net7'))">11.0</LangVersion>
<LangVersion Condition="$(CoreTargetFramework.StartsWith('net8'))">12.0</LangVersion>
-->
<Deterministic Condition="'$(Deterministic)' == ''">true</Deterministic>
<!--
If you target a framework earlier than .NET 5 (including .NET Framework and .NET Standard),
you should set ProduceReferenceAssembly to true in order to speed incremental builds.
If you multi-target and any target is before .NET 5, you need this.
Even if you target .NET 5 or later, having this property is fine.
-->
<ProduceReferenceAssembly Condition="'$(ProduceReferenceAssembly)' == ''">true</ProduceReferenceAssembly>
<SuppressNETCoreSdkPreviewMessage Condition="'$(SuppressNETCoreSdkPreviewMessage)' == ''">true</SuppressNETCoreSdkPreviewMessage>
<!-- Prevent missing await on async methods -->
<WarningsAsErrors>CS4014;$(WarningsAsErrors)</WarningsAsErrors>
<!-- Avoid warning NETSDK1138: The target framework 'netcoreapp3.1' is out of support -->
<CheckEolTargetFramework>false</CheckEolTargetFramework>
<!--
For TargetLatestRuntimePatch usage, see:
- https://codeblog.dotsandbrackets.com/package-downgrade-issue/
- https://learn.microsoft.com/en-us/dotnet/core/deploying/runtime-patch-selection
-->
<TargetLatestRuntimePatch Condition="'$(TargetLatestRuntimePatch)' == ''">true</TargetLatestRuntimePatch>
<!--
For AccelerateBuildsInVisualStudio, see:
- https://github.com/dotnet/project-system/blob/main/docs/build-acceleration.md
-->
<AccelerateBuildsInVisualStudio Condition="'$(AccelerateBuildsInVisualStudio)' == ''">true</AccelerateBuildsInVisualStudio>
</PropertyGroup>
<!-- Code analysis -->
<PropertyGroup>
<EnableNETAnalyzers Condition="'$(EnableNETAnalyzers)' == ''">false</EnableNETAnalyzers>
<AnalysisMode Condition="'$(AnalysisMode)' == ''">recommended</AnalysisMode>
<AnalysisLevel Condition="'$(AnalysisLevel)' == ''">latest-recommended</AnalysisLevel>
</PropertyGroup>
<!-- Versioning -->
<!-- https://andrewlock.net/version-vs-versionsuffix-vs-packageversion-what-do-they-all-mean -->
<!-- https://stackoverflow.com/questions/42183300/what-is-the-difference-between-various-msbuild-version-properties-such-as-versi -->
<!-- For backward compatibility -->
<PropertyGroup Condition ="'$(AssemblyVersion)' != ''">
<VersionPrefix>$(AssemblyVersion)</VersionPrefix>
</PropertyGroup>
<Target Name="TraceVersion" AfterTargets="GetAssemblyAttributes"
Condition="'$(ZouTrace)' == 'true' Or '$(ZouTraceVersion)' == 'true'">
<Message Importance="high" Text="zou/Directory.Build.Default.props [$(MSBuildProjectFile)]" />
<Message Importance="high" Text="---------------------------------" />
<Message Importance="high" Text="VersionPrefix = $(VersionPrefix)" />
<Message Importance="high" Text="VersionSuffix = $(VersionSuffix)" />
<Message Importance="high" Text="Version = $(Version)" />
<Message Importance="high" Text="AssemblyVersion = $(AssemblyVersion)" />
<Message Importance="high" Text="FileVersion = $(FileVersion)" />
<Message Importance="high" Text="InformationalVersion = $(InformationalVersion)" />
<Message Importance="high" Text="PackageVersion = $(PackageVersion)" />
<Message Importance="high" Text=" " />
</Target>
<Target Name="TraceDirectoryBuildDefaultProps"
Condition="'$(ZouTrace)' == 'true' Or '$(ZouDirectoryBuild)' == 'true'">
<Message Importance="high" Text="zou/Directory.Build.Default.props [$(MSBuildProjectFile)]" />
<Message Importance="high" Text="---------------------------------" />
<Message Importance="high" Text="LangVersion = $(LangVersion)" />
<Message Importance="high" Text="RazorLangVersion = $(RazorLangVersion)" />
<Message Importance="high" Text="Deterministic = $(Deterministic)" />
<Message Importance="high" Text="ProduceReferenceAssembly = $(ProduceReferenceAssembly)" />
<Message Importance="high" Text="TargetLatestRuntimePatch = $(TargetLatestRuntimePatch)" />
<Message Importance="high" Text="AccelerateBuildsInVisualStudio = $(AccelerateBuildsInVisualStudio)" />
<Message Importance="high" Text=" " />
</Target>
</Project>