-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDirectory.Build.props
More file actions
123 lines (107 loc) · 7.6 KB
/
Directory.Build.props
File metadata and controls
123 lines (107 loc) · 7.6 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
<Project>
<PropertyGroup Condition="'$(UsingMicrosoftNETSdk)' == 'true'">
<TargetFramework>net10.0-windows</TargetFramework>
<Nullable>enable</Nullable>
<!-- Zero-tolerance warning policy: every compiler and analyzer warning is an error.
The codebase builds with 0 warnings; this locks that in so regressions fail immediately.
Root fixes applied at source — no NoWarn suppressions anywhere:
• CS8xxx nullable — all properties/returns properly annotated (#nullable enable)
• CA1416 platform — GUI uses net10.0-windows10.0.19041.0 + SupportedOSPlatformVersion;
Core/CLI use net10.0-windows which covers only generic Windows APIs
(P/Invoke kernel32, WMI, Registry) that don't trigger CA1416
• WFO1000 designer — [DesignerSerializationVisibility(Hidden)] on Form result properties
Exception: Stryker mutation builds instrument code in ways that can introduce transient
diagnostics; disable the enforcement there so mutations can be injected freely. -->
<TreatWarningsAsErrors Condition="'$(STRYKER_BUILD)' != '1'">true</TreatWarningsAsErrors>
<ImplicitUsings>enable</ImplicitUsings>
<!-- x64-only: this project exclusively targets Intel x64 — no ARM, no x86.
PlatformTarget constrains the compiler; Platforms scopes the Solution
Configuration Manager to the x64 platform. Both are required. -->
<Platforms>x64</Platforms>
<PlatformTarget>x64</PlatformTarget>
<Version>6.33.0</Version>
<AssemblyVersion>6.33.0.0</AssemblyVersion>
<FileVersion>6.33.0.0</FileVersion>
<InformationalVersion>6.33.0</InformationalVersion>
<Deterministic>true</Deterministic>
<ContinuousIntegrationBuild Condition="'$(GITHUB_ACTIONS)' == 'true'">true</ContinuousIntegrationBuild>
<TieredCompilation>true</TieredCompilation>
<TieredPGO>true</TieredPGO>
<!-- Quick JIT for loops: allows tier-0 compilation of loop-bearing methods
for faster startup. Tiered PGO re-compiles hot methods to optimised
native code after profiling — so initial speed cost is temporary. -->
<TieredCompilation_QuickJitForLoops>true</TieredCompilation_QuickJitForLoops>
<!-- ReadyToRun: ahead-of-time compile during publish for faster cold-start
(~200-400ms improvement). Only applies to dotnet publish -r win-x64. -->
<PublishReadyToRun>true</PublishReadyToRun>
<!-- ── Build output redirection (OneDrive lock workaround) ─────────────
Redirect obj/ and bin/ to %TEMP%\RegiLattice-build\<ProjectName> so
MSBuild never touches OneDrive-synced paths during compilation.
This eliminates AssemblyInfoInputs.cache locking, Roslyn server file-
handle contention, and OneDrive re-upload churn on every build.
Layout under %TEMP%\RegiLattice-build\:
<ProjectName>\obj\ ← BaseIntermediateOutputPath
<ProjectName>\bin\ ← BaseOutputPath
CI: GITHUB_ACTIONS is always set, so the same env-var expansion works
on both developer machines and GitHub Actions runners automatically. -->
<!-- STRYKER_BUILD=1 disables the temp-path redirect so Stryker's Buildalyzer
can analyze the project with standard local bin/obj paths. -->
<RegiLatticeLocalBuildRoot Condition="'$(STRYKER_BUILD)' == ''">$(TEMP)\RegiLattice-build\$(MSBuildProjectName)</RegiLatticeLocalBuildRoot>
<BaseIntermediateOutputPath Condition="'$(STRYKER_BUILD)' == ''">$(RegiLatticeLocalBuildRoot)\obj\</BaseIntermediateOutputPath>
<BaseOutputPath Condition="'$(STRYKER_BUILD)' == ''">$(RegiLatticeLocalBuildRoot)\bin\</BaseOutputPath>
<!-- Keep UseSharedCompilation=false as a belt-and-suspenders guard for
any edge cases where the above redirect does not apply (e.g. custom
project files that override BaseIntermediateOutputPath). -->
<UseSharedCompilation>false</UseSharedCompilation>
<!-- Exclude local obj/ and bin/ directories from compile globs.
The SDK normally excludes $(BaseIntermediateOutputPath)** and
$(BaseOutputPath)** from Compile/Content/None globs. After
redirecting those paths to %TEMP%, the old in-repo obj/ and bin/
directories are no longer covered. Without this, any stale
auto-generated .cs files remaining in src/<Project>/obj/ are
double-compiled, causing CS0579 duplicate attribute errors on
clean or first-run builds. -->
<DefaultItemExcludes>$(DefaultItemExcludes);obj/**;bin/**</DefaultItemExcludes>
</PropertyGroup>
<!-- ── Release publish optimizations ─────────────────────────────────── -->
<!-- These properties only affect `dotnet publish -c Release`. They have
no effect on Debug builds, `dotnet build`, or `dotnet test`. -->
<PropertyGroup Condition="'$(Configuration)' == 'Release' and '$(UsingMicrosoftNETSdk)' == 'true'">
<!-- Embedded PDB: debug info baked into the assembly — no loose .pdb
files in publish output. Still provides full stack traces. -->
<DebugType>embedded</DebugType>
<!-- NOTE: IL trimming (PublishTrimmed) is set per-project, not here.
WinForms blocks trimming entirely (NETSDK1175). CLI.csproj enables
it; GUI.csproj does not. -->
<!-- Compress the single-file bundle for ~40% smaller download.
First launch decompresses to a temp cache (~200ms one-time cost);
subsequent launches use the cached extraction. -->
<EnableCompressionInSingleFile>true</EnableCompressionInSingleFile>
<!-- Strip native debug symbols from ReadyToRun pre-compiled images. -->
<StripSymbols>true</StripSymbols>
<!-- ── Feature switches ────────────────────────────────────────────
Disable unused runtime subsystems so the linker can remove them.
Each switch reduces binary size and memory footprint. -->
<!-- Hot reload is a dev-time feature — not needed in release binaries. -->
<MetadataUpdaterSupport>false</MetadataUpdaterSupport>
<!-- Distributed tracing activity propagation — not used. -->
<HttpActivityPropagationSupport>false</HttpActivityPropagationSupport>
<!-- BinaryFormatter is deprecated, dangerous, and not used (project
uses System.Text.Json). Disabling hardens against deserialization
attacks and lets the linker trim the formatter code. -->
<EnableUnsafeBinaryFormatterSerialization>false</EnableUnsafeBinaryFormatterSerialization>
<!-- Startup hooks are a diagnostic/testing mechanism — not needed in
release binaries. Disabling removes the hook discovery overhead. -->
<StartupHookSupport>false</StartupHookSupport>
<!-- EventSource tracing infrastructure — not used by this project.
Disabling removes ETW event-pipe initialization at startup. -->
<EventSourceSupport>false</EventSourceSupport>
<!-- Optimize for speed over size in Release. Enables aggressive inlining,
loop optimizations, and larger method bodies in R2R pre-compilation. -->
<OptimizationPreference>Speed</OptimizationPreference>
</PropertyGroup>
<PropertyGroup Condition="'$(UsingMicrosoftNETSdk)' == 'true' and '$(IsTestProject)' == 'true'">
<IsPackable>false</IsPackable>
<DisableAppDomain>true</DisableAppDomain>
</PropertyGroup>
</Project>