-
Notifications
You must be signed in to change notification settings - Fork 1
/
Directory.Build.props
107 lines (89 loc) · 5.27 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
<?xml version="1.0" encoding="utf-8"?>
<Project>
<PropertyGroup>
<EnlistmentRoot>$(MSBuildThisFileDirectory.TrimEnd('\\'))</EnlistmentRoot>
<CurrentTargetFramework>net8.0</CurrentTargetFramework>
<CurrentWpfTargetFramework>net8.0-windows</CurrentWpfTargetFramework>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x64</Platform>
<!-- https://learn.microsoft.com/en-us/dotnet/core/runtime-config/globalization#invariant-mode -->
<InvariantGlobalization>true</InvariantGlobalization>
<ProduceReferenceAssembly Condition="'$(MSBuildProjectExtension)' == '.csproj'">true</ProduceReferenceAssembly>
<Deterministic>true</Deterministic>
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
<!-- Pipeline build must follow lock file instead of update them. -->
<RestoreLockedMode Condition="'$(ContinuousIntegrationBuild)' == 'true'">true</RestoreLockedMode>
<RestorePackagesConfig>true</RestorePackagesConfig>
<RestoreUseStaticGraphEvaluation>true</RestoreUseStaticGraphEvaluation>
<!-- https://devblogs.microsoft.com/nuget/introducing-central-package-management/ -->
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<CentralPackageTransitivePinningEnabled>true</CentralPackageTransitivePinningEnabled>
<EnablePackageVersionOverride>false</EnablePackageVersionOverride>
</PropertyGroup>
<!-- TF_BUILD is automatically set in Azure Pipelines -->
<!-- https://docs.microsoft.com/en-us/azure/devops/pipelines/build/variables?view=azure-devops&tabs=yaml#system-variables-devops-services -->
<PropertyGroup Condition="'$(TF_BUILD)' == 'true'">
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
</PropertyGroup>
<PropertyGroup Label="Nerdbank.GitVersioning">
<!--
https://github.com/dotnet/Nerdbank.GitVersioning/blob/v3.5.119/doc/msbuild.md#reducing-getbuildversion-invocations -->
<GitVersionBaseDirectory>$(MSBuildThisFileDirectory)</GitVersionBaseDirectory>
</PropertyGroup>
<Sdk Name="DotNet.ReproducibleBuilds.Isolated" />
<ItemGroup Label="Global References" Condition="'$(MSBuildProjectExtension)' != '.proj'">
<PackageReference Include="Nerdbank.GitVersioning" PrivateAssets="All" IncludeAssets="Analyzers;Build" />
<PackageReference Include="DotNet.ReproducibleBuilds" PrivateAssets="All" IncludeAssets="Analyzers;Build" />
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" IncludeAssets="Analyzers;Build" />
<PackageReference Include="Microsoft.CodeAnalysis.BannedApiAnalyzers" PrivateAssets="All" IncludeAssets="Analyzers;Build" />
<PackageReference Include="StyleCop.Analyzers" PrivateAssets="All" IncludeAssets="Analyzers;Build" />
</ItemGroup>
<PropertyGroup Label="SourceLink">
<ProjectUrl>https://github.com/hcoona/OneDotNet</ProjectUrl>
<RepositoryUrl>https://github.com/hcoona/OneDotNet.git</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<DebugSymbols>true</DebugSymbols>
<DebugType>portable</DebugType>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
</PropertyGroup>
<Import Project="$(EnlistmentRoot)/stylecop.props" />
<PropertyGroup Label="SlnGen">
<SlnGenFolders>true</SlnGenFolders>
</PropertyGroup>
<ItemGroup Label="SlnGen">
<SlnGenSolutionItem Include="$(EnlistmentRoot)\.editorconfig" />
<SlnGenSolutionItem Include="$(EnlistmentRoot)\global.json" />
<SlnGenSolutionItem Include="$(EnlistmentRoot)\NuGet.Config" />
<SlnGenSolutionItem Include="$(EnlistmentRoot)\OneDotNet.ruleset" />
<SlnGenSolutionItem Include="$(EnlistmentRoot)\Directory.Build.props" />
<SlnGenSolutionItem Include="$(EnlistmentRoot)\Directory.Build.rsp" />
<SlnGenSolutionItem Include="$(EnlistmentRoot)\Directory.Build.targets" />
<SlnGenSolutionItem Include="$(EnlistmentRoot)\Directory.Packages.props" />
<SlnGenSolutionItem Include="$(EnlistmentRoot)\README.adoc" />
<SlnGenSolutionItem Include="$(EnlistmentRoot)\stylecop.json" />
<SlnGenSolutionItem Include="$(EnlistmentRoot)\version.json" />
</ItemGroup>
<PropertyGroup Label="NuPack">
<Authors>Shuai Zhang</Authors>
<Company>Shuai Zhang</Company>
<PackageLicenseExpression>GPL-3.0-or-later</PackageLicenseExpression>
</PropertyGroup>
<PropertyGroup Label="Artifacts">
<ArtifactsPath>$(EnlistmentRoot)\out</ArtifactsPath>
<DefaultArtifactsFileMatch>$(DefaultArtifactsFileMatch) *.exe *.dll *.exe.config *.deps.json *.runtimeconfig.json</DefaultArtifactsFileMatch>
</PropertyGroup>
<PropertyGroup Label="Code Analysis">
<!-- TODO(shuaizhang): update to 8.0 -->
<AnalysisLevel>6.0</AnalysisLevel>
<!-- Use 'Recommended' in the future. -->
<AnalysisMode>Recommended</AnalysisMode>
<!-- CA2253: Temporarily. -->
<!-- CA2254: https://stackoverflow.com/questions/70955861/the-logging-message-template-should-not-vary-between-calls-ca2254-when-only-pa -->
<NoWarn>$(NoWarn);CA2253;CA2254</NoWarn>
<CodeAnalysisTreatWarningsAsErrors>true</CodeAnalysisTreatWarningsAsErrors>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
</PropertyGroup>
</Project>