-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathDirectory.Build.props
More file actions
117 lines (102 loc) · 7.08 KB
/
Copy pathDirectory.Build.props
File metadata and controls
117 lines (102 loc) · 7.08 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
<?xml version="1.0" encoding="utf-8"?>
<Project>
<!-- Import repository path definitions -->
<Import Project="$(MSBuildThisFileDirectory)msbuild/repository.props" />
<!-- Composed platform package IDs (sourceName-safe; see timewarp-platform-packages.props) -->
<Import Project="$(MSBuildThisFileDirectory)msbuild/timewarp-platform-packages.props"
Condition="'$(_TwPlatformPackagesPropsImported)' != 'true'" />
<!-- Platform distribution switches (tasks 051/092/115): ProjectReference when the source tree is
present (this repo dogfoods), PackageReference when the template excluded it (generated
apps). Detection lives at ROOT (not source/Directory.Build.props) because tests/ projects
need the switches too — tests/common/timewarp-testing references identity dual-mode
(task 124) and the source-tree props never reach the tests tree. Force with
-p:UseFoundationPackages= / -p:UseAnalyzerPackages= / -p:UseIdentityPackages=. -->
<PropertyGroup Label="Platform Distribution Switches">
<UseFoundationPackages Condition="'$(UseFoundationPackages)' == '' and !Exists('$(MSBuildThisFileDirectory)source/foundation/foundation-domain/foundation-domain.csproj')">true</UseFoundationPackages>
<UseFoundationPackages Condition="'$(UseFoundationPackages)' == ''">false</UseFoundationPackages>
<UseAnalyzerPackages Condition="'$(UseAnalyzerPackages)' == '' and !Exists('$(MSBuildThisFileDirectory)source/analyzers/timewarp-architecture-convention-analyzers/timewarp-architecture-convention-analyzers.csproj')">true</UseAnalyzerPackages>
<UseAnalyzerPackages Condition="'$(UseAnalyzerPackages)' == ''">false</UseAnalyzerPackages>
<UseIdentityPackages Condition="'$(UseIdentityPackages)' == '' and !Exists('$(MSBuildThisFileDirectory)source/libraries/timewarp-identity/timewarp-identity.csproj')">true</UseIdentityPackages>
<UseIdentityPackages Condition="'$(UseIdentityPackages)' == ''">false</UseIdentityPackages>
<UseX402Packages Condition="'$(UseX402Packages)' == '' and !Exists('$(MSBuildThisFileDirectory)source/libraries/timewarp-402/timewarp-402.csproj')">true</UseX402Packages>
<UseX402Packages Condition="'$(UseX402Packages)' == ''">false</UseX402Packages>
</PropertyGroup>
<!-- MSBuild and NuGet behavior configuration -->
<PropertyGroup Label="MSBuild/NuGet Configuration">
<!-- Output packages to our local feed directory -->
<PackageOutputPath>$(PackagesDirectory)</PackageOutputPath>
<!-- Suppress .NET preview SDK message -->
<SuppressNETCoreSdkPreviewMessage>true</SuppressNETCoreSdkPreviewMessage>
</PropertyGroup>
<!-- Default language and framework settings for all projects -->
<PropertyGroup Label="Project Defaults">
<!-- Package <Version> lives in source/Directory.Build.props (TimeWarp convention + dev check-version). -->
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<LangVersion>latest</LangVersion>
<IsPackable>false</IsPackable>
</PropertyGroup>
<!-- Source generator debugging: emit generated files to artifacts directory -->
<PropertyGroup Label="Source Generator Output">
<EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>
<CompilerGeneratedFilesOutputPath>$(ArtifactsDirectory)generated/$(MSBuildProjectName)</CompilerGeneratedFilesOutputPath>
</PropertyGroup>
<!-- Exclude emitted generated files from compilation (already included by source generator) -->
<ItemGroup Label="Source Generator Output">
<Compile Remove="$(CompilerGeneratedFilesOutputPath)/**/*.cs" />
</ItemGroup>
<!-- C# Interceptors (for source generators) -->
<PropertyGroup Label="Interceptors">
<!-- Enable interceptors in the TimeWarp.Nuru.Generated namespace -->
<!-- Note: Property name changed from InterceptorsPreviewNamespaces to InterceptorsNamespaces in .NET 10 -->
<InterceptorsNamespaces>$(InterceptorsNamespaces);TimeWarp.Nuru.Generated</InterceptorsNamespaces>
</PropertyGroup>
<!-- Code quality, analyzers, and warning configuration -->
<PropertyGroup Label="Code Quality and Analysis">
<!-- Treat all warnings as errors -->
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<WarningLevel>5</WarningLevel>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<AnalysisMode>All</AnalysisMode>
<AnalysisLevel>latest-all</AnalysisLevel>
<!-- Report analyzer diagnostics in build output -->
<ReportAnalyzer>true</ReportAnalyzer>
<CodeAnalysisTreatWarningsAsErrors>true</CodeAnalysisTreatWarningsAsErrors>
<!-- IDE0005 (unnecessary usings) at warning severity requires a documentation file during
build (Roslyn #41640 / EnableGenerateDocumentationFile). We emit the file but do not
require public API XML docs — CS1591 stays suppressed. Task 170. -->
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<!-- Suppress specific warnings -->
<!-- CA1014: CLS compliance not required for this library -->
<!-- CA1716: Reserved keywords (matching System.Console API: In, Error) -->
<!-- CA1724: Type name conflicts (acceptable in this context) -->
<!-- CA1812: False positives for DI-instantiated classes -->
<!-- IL2026, IL2067, IL2070, IL2075, IL3050, IL2104, IL3053: AOT warnings (not yet implemented) -->
<!-- XML-doc noise once GenerateDocumentationFile is on for IDE0005 (Roslyn #41640):
missing/broken cref/param tags are not house style gates — only IDE0005 is. -->
<NoWarn>$(NoWarn);CA1014;CA1716;CA1724;CA1812;IL2026;IL2067;IL2070;IL2075;IL3050;IL2104;IL3053;1591;1570;1571;1572;1573;1574;1580;1581;1584;1587;1589;1590;1592;1710;1711;1712;1734;0419</NoWarn>
</PropertyGroup>
<!-- Code analyzers applied to all projects -->
<ItemGroup Label="Code Analyzers">
<PackageReference Include="Roslynator.Analyzers" PrivateAssets="all" />
<PackageReference Include="Roslynator.CodeAnalysis.Analyzers" PrivateAssets="all" />
<PackageReference Include="Roslynator.Formatting.Analyzers" PrivateAssets="all" />
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" PrivateAssets="all" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.CodeStyle" PrivateAssets="all" />
<PackageReference Include="Microsoft.CodeAnalysis.BannedApiAnalyzers" PrivateAssets="all" />
<!-- Prefer project global-usings.cs over file-level usings (editorconfig GlobalUsingsAnalyzer000*). Task 172. -->
<PackageReference Include="GlobalUsingsAnalyzer" PrivateAssets="all" />
<!-- TW0001 kebab-case .cs basenames (TimeWarp.SourceGenerators; multi-dot partials since beta.9).
Severity: .editorconfig dotnet_diagnostic.TW0001 — default off in the package. -->
<PackageReference Include="TimeWarp.SourceGenerators" PrivateAssets="all" />
</ItemGroup>
<!-- Banned API enforcement -->
<ItemGroup Label="Banned API Files">
<AdditionalFiles Include="$(MSBuildThisFileDirectory)BannedSymbols.txt" />
</ItemGroup>
<ItemGroup Label="Build Tasks">
<PackageReference Include="TimeWarp.Build.Tasks" PrivateAssets="all" />
</ItemGroup>
</Project>