-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDirectory.Build.props
More file actions
134 lines (114 loc) · 5.91 KB
/
Copy pathDirectory.Build.props
File metadata and controls
134 lines (114 loc) · 5.91 KB
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
<Project>
<!--
Directory.Build.props — repo root
══════════════════════════════════
MSBuild automatically imports this file for every .csproj in the repo,
walking up from the project folder until it finds one.
Sub-folders (e.g. apps/web/, packages/core/) can have their own
Directory.Build.props that imports this one and then overrides specific
properties. Pattern for a child file:
<Project>
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" />
<PropertyGroup>
... overrides here ...
</PropertyGroup>
</Project>
-->
<!-- ── Target framework ───────────────────────────────────────────────── -->
<PropertyGroup>
<!--
Default TFM for all projects. Avalonia and Blazor both support net10.0.
Desktop apps that need platform-specific APIs can override with
net10.0-windows, net10.0-macos etc. in their own .csproj.
-->
<TargetFramework>net10.0</TargetFramework>
<!--
Produce deterministic builds — same inputs always produce identical
binary output. Important for NuGet package reproducibility.
-->
<Deterministic>true</Deterministic>
</PropertyGroup>
<!-- ── Language & compiler ────────────────────────────────────────────── -->
<PropertyGroup>
<!-- Always use the latest stable C# version available in the SDK -->
<LangVersion>latest</LangVersion>
<!-- Enforce nullable reference types across the whole repo.
New code must be null-safe; existing code will surface warnings
as you migrate. Set to 'warnings' first if onboarding a large
legacy codebase. -->
<Nullable>enable</Nullable>
<!-- Enable implicit global usings (System, System.Linq, etc.)
Each project type (web, console, test) gets its own set automatically. -->
<ImplicitUsings>enable</ImplicitUsings>
<!-- Treat all compiler warnings as errors in CI.
Override to 'false' in a specific project if you have a legitimate
exception (e.g. a generated-code project). -->
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<!-- Enable .NET 10 analysis rules at the recommended level.
'Default' is a good balance; switch to 'All' if you want maximum
pedantry on new projects. -->
<AnalysisLevel>latest-recommended</AnalysisLevel>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
</PropertyGroup>
<!-- ── NuGet package metadata (applies to all published packages) ──────── -->
<PropertyGroup>
<!--
Shared metadata for all ~50 NuGet packages. Individual packages can
override any of these in their own .csproj.
-->
<Authors>Jason Barden</Authors>
<Company>AStar Development</Company>
<Copyright>Copyright © $([System.DateTime]::Now.Year) AStar Development</Copyright>
<!--
Version is set by CI via -p:Version=$(GitTag) at publish time.
This is the fallback for local development builds.
-->
<Version>0.1.0</Version>
<AssemblyVersion>0.1.0.0</AssemblyVersion>
<FileVersion>0.1.0.0</FileVersion>
<!-- Embed symbols in the package for a better debugging experience -->
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<!-- Embed source files in the PDB so consumers can step through your code -->
<EmbedAllSources>true</EmbedAllSources>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<!--
Required for deterministic/source-linked builds.
Set your actual GitHub repo URL here.
-->
<RepositoryUrl>https://github.com/your-org/astar-dev-mono/</RepositoryUrl>
<RepositoryType>git</RepositoryType>
</PropertyGroup>
<!-- ── Output paths ───────────────────────────────────────────────────── -->
<PropertyGroup>
<!--
Redirect all bin/ and obj/ output to a single folder at the repo root.
This keeps the source tree clean and makes it easy to .gitignore
all build output in one line: /artifacts/
-->
<BaseOutputPath>$(MSBuildThisFileDirectory)artifacts/bin/$(MSBuildProjectName)</BaseOutputPath>
<BaseIntermediateOutputPath>$(MSBuildThisFileDirectory)artifacts/obj/$(MSBuildProjectName)</BaseIntermediateOutputPath>
<!-- Keep the standard Debug/Release subfolder structure within artifacts/ -->
<AppendTargetFrameworkToOutputPath>true</AppendTargetFrameworkToOutputPath>
<AppendRuntimeIdentifierToOutputPath>true</AppendRuntimeIdentifierToOutputPath>
</PropertyGroup>
<!-- ── Test projects ──────────────────────────────────────────────────── -->
<!--
Projects whose names contain .Tests (covering *.Tests, *.Tests.Unit,
*.Tests.Integration etc.) or end in .IntegrationTests are not published
as NuGet packages.
CA1707 (identifier contains underscores) is suppressed because the repo
mandates the when_[action]_then_[outcome] snake_case naming convention
for all test methods; underscores are intentional and required by style.
-->
<PropertyGroup Condition="$(MSBuildProjectName.Contains('.Tests'))
Or $(MSBuildProjectName.EndsWith('.IntegrationTests'))">
<IsPackable>false</IsPackable>
<IsPublishable>false</IsPublishable>
<!--
CA1859: Use concrete types for fields — suppressed in tests because the
sut field must be typed to the interface to exercise the public contract.
-->
<NoWarn>$(NoWarn);CA1707;CA1859</NoWarn>
</PropertyGroup>
</Project>