forked from dotnet/upgrade-assistant
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Directory.Build.props
56 lines (50 loc) · 2.33 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
<Project>
<Import Project="Sdk.props" Sdk="Microsoft.DotNet.Arcade.Sdk" />
<PropertyGroup>
<Copyright>$(CopyrightNetFoundation)</Copyright>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<ValidateLayerDiagram>true</ValidateLayerDiagram>
<DebugType>embedded</DebugType>
<DebugSymbols>true</DebugSymbols>
<!--
Use version 3.8.0 of CodeAnalysis assemblies to preserve compatibility
with Visual Studio 2019 16.8
-->
<MicrosoftCodeAnalysisVersion>3.8.0</MicrosoftCodeAnalysisVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(DotNetBuildFromSource)' == 'true'">
<!--
When building using source-build the process is:
- Newtonsoft.Json versions 9.0.1 and 12.0.2 are built by source-build
- Version 12.0.2 is written to Version.props
- Arcade needs to use 9.0.1 so we need to override Version.props value here
-->
<NewtonsoftJsonVersion>9.0.1</NewtonsoftJsonVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(DotNetBuildOffline)' == 'true'">
<!--
Arcade has a special version prop for CodeAnalysis.CSharp in GenFacades
to try to match the version loaded by msbuild. In the offline build, this
is simply the source-built version.
-->
<MsbuildTaskMicrosoftCodeAnalysisCSharpVersion>$(MicrosoftCodeAnalysisVersion)</MsbuildTaskMicrosoftCodeAnalysisCSharpVersion>
</PropertyGroup>
<!-- Common properties regarding language version, CA rulesets, output paths, etc. -->
<PropertyGroup>
<LangVersion>10.0</LangVersion>
<WarningLevel>9999</WarningLevel>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<AnalysisLevel>latest</AnalysisLevel>
<AnalysisMode>AllEnabledByDefault</AnalysisMode>
<Nullable>enable</Nullable>
<CodeAnalysisRuleSet>$(MSBuildThisFileDirectory)\rules.ruleset</CodeAnalysisRuleSet>
<!-- Ignore CA2254 The logging message template should not vary between calls. EditorConfig doesn't seem to honored for this -->
<NoWarn>$(NoWarn);CA2254</NoWarn>
</PropertyGroup>
<!-- Treat warnings as errors in release builds, so that all warnings
are fixed before pushing to CI but don't need to be immediately
fixed during development -->
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
</Project>