Repository navigation
Expand file tree
/
Copy pathDirectory.Build.props
More file actions
92 lines (88 loc) · 6.04 KB
/
Copy pathDirectory.Build.props
File metadata and controls
92 lines (88 loc) · 6.04 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
<Project>
<!-- ARCH-0124: every active package inherits the repository's single NBGV release train. -->
<PropertyGroup>
<!-- Generate XML docs for all projects to support API documentation. -->
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<!-- Suppress missing XML comment warnings to keep builds clean while docs evolve. -->
<NoWarn>$(NoWarn);1591</NoWarn>
<!-- CI-friendly builds (SourceLink, deterministic PDBs) -->
<ContinuousIntegrationBuild Condition="'$(ContinuousIntegrationBuild)' == ''">true</ContinuousIntegrationBuild>
<!-- Scratch scaffolds under tmp/ are outside the release train: no SourceLink, no NBGV,
no CPM - they restore against the public feed exactly like a user's project would. -->
<_KoanScratchRoot>$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)tmp'))</_KoanScratchRoot>
<!-- SourceLink/Repo metadata -->
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<!--
NuGet package IDs: publish under Sylin.Koan.* while keeping code namespaces as Koan.*
Condition: apply UNLESS the csproj has IsPackable=false. SDK defaults leave IsPackable
unset for class libraries (still packable), and that case must still get the prefix —
the previous `IsPackable == 'true'` condition silently failed for those projects and
they ended up published as `Koan.*` instead of `Sylin.Koan.*`.
Source: MSBuildProjectName (the bare csproj filename without extension). Using
$(AssemblyName) here would produce "Sylin." literally — AssemblyName isn't resolved
yet at props-evaluation time. MSBuildProjectName is always defined.
-->
<PackageId Condition="'$(IsPackable)' != 'false' and '$(PackageId)' == ''">Sylin.$(MSBuildProjectName)</PackageId>
<!-- R09-08: the standard package identity is also the module identity. Non-packable projects
fall back to the SDK's ordinary project/assembly name; module authors declare no Koan ID. -->
<KoanModuleIdentity Condition="'$(PackageId)' != ''">$(PackageId)</KoanModuleIdentity>
<KoanModuleIdentity Condition="'$(KoanModuleIdentity)' == ''">$(MSBuildProjectName)</KoanModuleIdentity>
<!-- Common NuGet package metadata -->
<Authors>Sylin Labs</Authors>
<Company>Sylin Labs</Company>
<PackageProjectUrl>https://github.com/sylin-org/Koan-framework</PackageProjectUrl>
<RepositoryUrl>https://github.com/sylin-org/Koan-framework.git</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<!-- A package page must be owned by the package. Missing README.md is an R11 repair,
never an invitation to publish the framework root README under a different identity. -->
<PackageReadmeFile Condition="Exists('$(MSBuildProjectDirectory)\README.md')">README.md</PackageReadmeFile>
<!-- Only universally true discovery terms belong here. Capability vocabulary is package-owned. -->
<CommonPackageTags>koan;dotnet;framework</CommonPackageTags>
<!-- Baseline language/features across the repo -->
<ImplicitUsings Condition="'$(ImplicitUsings)' == ''">enable</ImplicitUsings>
<Nullable Condition="'$(Nullable)' == ''">enable</Nullable>
<!-- Prefer a modern compiler; projects can override if needed -->
<LangVersion Condition="'$(LangVersion)' == ''">latestMajor</LangVersion>
</PropertyGroup>
<ItemGroup Condition="!$([System.String]::Copy('$(MSBuildProjectDirectory)').StartsWith('$(_KoanScratchRoot)'))">
<CompilerVisibleProperty Include="PackageId" />
<CompilerVisibleProperty Include="IsTestProject" />
<AssemblyMetadata Include="KoanModuleIdentity" Value="$(KoanModuleIdentity)" />
<!-- SourceLink for better debugging experience on NuGet -->
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
<!-- Nerdbank.GitVersioning is the single version source. Version / AssemblyVersion /
FileVersion are computed from the root version.json release line plus git commit height.
PrivateAssets=all so it never flows to consumers. -->
<PackageReference Include="Nerdbank.GitVersioning" PrivateAssets="all" />
</ItemGroup>
<ItemGroup>
<!-- Canonical package presentation: one package-owned README and one repository-owned mascot. -->
<None Include="$(MSBuildProjectDirectory)\README.md" Pack="true" PackagePath="/" Condition="Exists('$(MSBuildProjectDirectory)\README.md')" />
<None Include="$(MSBuildThisFileDirectory)icon.png" Pack="true" PackagePath="/" />
</ItemGroup>
<!-- In-repo Roslyn generators attached as analyzers. -->
<ItemGroup Condition="!$([System.String]::Copy('$(MSBuildProjectDirectory)').StartsWith('$(_KoanScratchRoot)'))">
<!--
Registry generator (modern IIncrementalGenerator). Harmless on projects with no registry
entries — emits nothing. Still attached broadly because some downstream Koan projects do
rely on its output. Exclusion list keeps it from analyzing itself or the orchestration
generator project.
Scratch scaffolds under tmp/ are excluded too: package consumers already receive this
generator via Sylin.Koan.Core's buildTransitive targets, and attaching the in-repo copy as
well makes two generator instances emit the identical KoanRegistry_<app>.g.cs hint name,
failing the build with CS9068 (duplicate file-local type at the same path).
-->
<ProjectReference Include="$(MSBuildThisFileDirectory)src\Koan.Core.Registry.Generators\Koan.Core.Registry.Generators.csproj"
OutputItemType="Analyzer"
ReferenceOutputAssembly="false"
Condition="Exists('$(MSBuildThisFileDirectory)src\Koan.Core.Registry.Generators\Koan.Core.Registry.Generators.csproj') and '$(MSBuildProjectName)' != 'Koan.Core.Registry.Generators' and '$(MSBuildProjectName)' != 'Koan.Orchestration.Generators'" />
</ItemGroup>
<PropertyGroup>
<PackageIcon>icon.png</PackageIcon>
</PropertyGroup>
</Project>