-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDirectory.Build.props
More file actions
80 lines (70 loc) · 4.42 KB
/
Copy pathDirectory.Build.props
File metadata and controls
80 lines (70 loc) · 4.42 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
<Project>
<PropertyGroup>
<Version>8.0.0</Version>
<Authors>CaffeinatedCoder</Authors>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<PackageProjectUrl>https://github.com/CaffeinatedCoder/CodoMetis.ValueRanges</PackageProjectUrl>
<RepositoryUrl>https://github.com/CaffeinatedCoder/CodoMetis.ValueRanges</RepositoryUrl>
<RepositoryType>git</RepositoryType>
</PropertyGroup>
<!--
Warnings are errors, with one carve-out.
GenerateDocumentationFile means CS1591 (missing XML comment) polices the public surface: the
.xml shipped in the package is what a consumer sees in IntelliSense, and a hole in it is a
hole in the API documentation. Making it an error is the only thing that keeps that true —
the sibling repository had accumulated 64 of them before doing this. Test projects opt out
of CS1591 in their own csproj; nothing else is exempt.
NU1901-NU1904 stay warnings. They report a vulnerable package, so whether the build passes
would depend on advisories published upstream rather than on anything in this commit; as
errors they would break unrelated CI runs at unpredictable moments. They must stay visible,
so they are exempted rather than suppressed with NoWarn.
Deliberate internal-API usage (EF1001) is acknowledged at the file, next to the reason,
never here — a repo-wide suppression would also hide the next accidental one.
-->
<PropertyGroup>
<WarningsNotAsErrors>NU1901;NU1902;NU1903;NU1904</WarningsNotAsErrors>
</PropertyGroup>
<!--
GeneratePackageOnBuild is deliberately NOT set. The SDK's pack targets prepend `Build` to
GenerateNuspecDependsOn only when NoBuild != true AND GeneratePackageOnBuild != true, so
turning it on silently makes plain `dotnet pack` behave as if the no-build switch had been
passed. That packs whatever happens to be in bin/ — stale output on a laptop, and NU5026 on
a clean checkout where bin/ is empty. The workflows always build first, which is why it
never bit here; PackagingConventionTests keeps it out.
-->
<!--
Every pack is checked against the last release for API breaks.
The README has claimed "no breaking changes" for two majors running; this makes the claim
mechanical. At pack time the SDK restores each package at the baseline version from
nuget.org and runs ApiCompat over the public surface — a removed or changed member fails the
pack (CP0001/CP0002/...), in CI's Pack job and in the release gate.
The baseline is the last release. When Version is bumped for the next one it stays as the
release being superseded, and PackagingConventionTests requires it to be that release or
the shipped version — never older — so it moves with every bump instead of fossilising.
For a release that breaks on purpose: run
`dotnet pack -c Release /p:ApiCompatGenerateSuppressionFile=true`, read the generated
CompatibilitySuppressions.xml — each entry is one breaking change and belongs in the
changelog's migration notes — commit it, and delete it after the release once the baseline
moves past it. A new package with no release yet sets PackageValidationBaselineVersion
empty in its own csproj until it has one.
-->
<PropertyGroup>
<EnablePackageValidation>true</EnablePackageValidation>
<PackageValidationBaselineVersion>7.0.0</PackageValidationBaselineVersion>
</PropertyGroup>
<!-- Provenance: a consumer stepping into this code gets the exact source it is running.
Source Link ships in the SDK, so no PackageReference is needed. -->
<PropertyGroup>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
</PropertyGroup>
<!-- CI only: normalizes source paths for a reproducible build, which is right for a
published package and breaks local step-into debugging. -->
<PropertyGroup Condition="'$(CI)' == 'true' or '$(CI)' == '1'">
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
</PropertyGroup>
</Project>