-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDirectory.Build.props
More file actions
122 lines (106 loc) · 7.75 KB
/
Copy pathDirectory.Build.props
File metadata and controls
122 lines (106 loc) · 7.75 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
<Project>
<!-- ───────────────────────────── Project-kind detection (must run before any
kind-dependent logic; MSBuildProjectName is available during props eval) ──── -->
<PropertyGroup>
<IsTestProject Condition="'$(IsTestProject)' == '' AND ($(MSBuildProjectName.EndsWith('.Tests')) OR $(MSBuildProjectName.EndsWith('.IntegrationTests')) OR $(MSBuildProjectName.EndsWith('.ChaosTests')) OR $(MSBuildProjectName.EndsWith('.FuzzTests')))">true</IsTestProject>
<IsBenchmarkProject Condition="'$(IsBenchmarkProject)' == '' AND $(MSBuildProjectName.EndsWith('.Benchmarks'))">true</IsBenchmarkProject>
<IsSampleProject Condition="'$(IsSampleProject)' == '' AND $(MSBuildProjectName.Contains('.Sample'))">true</IsSampleProject>
</PropertyGroup>
<!-- ───────────────────────────── Language / compiler ───────────────────────────── -->
<PropertyGroup>
<LangVersion>latest</LangVersion>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<Features>strict</Features>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<AnalysisLevel>latest-recommended</AnalysisLevel>
<Deterministic>true</Deterministic>
<AccelerateBuildsInVisualStudio>true</AccelerateBuildsInVisualStudio>
<InvariantGlobalization>true</InvariantGlobalization>
</PropertyGroup>
<!-- ───────────────────────────── Strong-name signing ──────────────────────────────
Every assembly in the solution is strong-named with a single committed key. Strong
naming is an identity mechanism (not tamper protection — that is Authenticode), so the
key is checked in (see .gitattributes "*.snk binary"). Roslyn signs on every OS, so no
sn.exe is needed at build time. Setting $(PublicKey) makes the SDK auto-append
", PublicKey=…" to every InternalsVisibleTo item, keeping friend access valid for the
now strong-named assemblies (otherwise CS1726). All target frameworks are .NET Core, so
there is no strong-name → unsigned-reference load restriction. -->
<PropertyGroup>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)eng/IoTHubby.snk</AssemblyOriginatorKeyFile>
<PublicKey>0024000004800000940000000602000000240000525341310004000001000100919eae64eb44f735079a6999da3a6d7c383f73361c920ae171a88488f74fcaf121bf42f0e482b51f68fbd37a6f9cb0bf12f1bc60e823b5298292c2130b44ba0f4f89e0f6e4ec9267ed1adbdd94493dafa03794edc7cdaa9e4a480a33053fce2a56277ffcf87578cf5d5da3cd21d664d2005a9aed44371ce0366996bdff8703b1</PublicKey>
</PropertyGroup>
<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
</PropertyGroup>
<!-- ───────────────────────────── Project-kind flags ───────────────────────────── -->
<PropertyGroup>
<_IsProductionLibrary Condition="'$(IsTestProject)' != 'true' AND '$(IsSampleProject)' != 'true' AND '$(IsBenchmarkProject)' != 'true'">true</_IsProductionLibrary>
</PropertyGroup>
<!-- ───────────────────────────── Library (packable) defaults ───────────────────── -->
<PropertyGroup>
<!-- Generated everywhere so IDE0005 (remove unused usings) can run on build. -->
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>
<PropertyGroup Condition="'$(_IsProductionLibrary)' == 'true'">
<IsPackable>true</IsPackable>
<EnablePackageValidation>true</EnablePackageValidation>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<DebugType>portable</DebugType>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<Authors>marcschier</Authors>
<Company>marcschier</Company>
<Product>IoTHubby</Product>
<Copyright>Copyright (c) marcschier</Copyright>
<PackageProjectUrl>https://github.com/marcschier/iothubby</PackageProjectUrl>
<RepositoryUrl>https://github.com/marcschier/iothubby</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup>
<PropertyGroup Condition="'$(_IsProductionLibrary)' != 'true'">
<IsPackable>false</IsPackable>
<!-- Non-shipping projects don't require XML doc comments on public members, and they
host generated code (TUnit, Rocks) whose doc comments must not fail the build. -->
<NoWarn>$(NoWarn);CS1591;CS1570;CS1571;CS1572;CS1573;CS1574;CS1580;CS1581;CS1584</NoWarn>
</PropertyGroup>
<!-- ───────────────────────────── NativeAOT / trim compatibility (net8+) ────────── -->
<PropertyGroup Condition="'$(_IsProductionLibrary)' == 'true' AND ('$(TargetFramework)' == 'net8.0' OR '$(TargetFramework)' == 'net9.0' OR '$(TargetFramework)' == 'net10.0')">
<IsAotCompatible>true</IsAotCompatible>
<IsTrimmable>true</IsTrimmable>
<EnableAotAnalyzer>true</EnableAotAnalyzer>
<EnableTrimAnalyzer>true</EnableTrimAnalyzer>
<EnableSingleFileAnalyzer>true</EnableSingleFileAnalyzer>
</PropertyGroup>
<!-- ───────────────────────────── Shared analyzers ──────────────────────────────── -->
<ItemGroup>
<PackageReference Include="Nerdbank.GitVersioning" PrivateAssets="all" />
<PackageReference Include="Roslynator.Analyzers" PrivateAssets="all" />
<PackageReference Include="Roslynator.Formatting.Analyzers" PrivateAssets="all" />
</ItemGroup>
<!-- ───────────────────────────── netstandard polyfills ────────────────────────────
Referenced only for net8.0 / netstandard, so the net9/net10 builds (and the net8/9/10
hot paths) stay lean — no extra packages on the modern TFMs. -->
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0' Or '$(TargetFramework)' == 'netstandard2.0' Or '$(TargetFramework)' == 'netstandard2.1'">
<PackageReference Include="System.IO.Pipelines" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0' Or '$(TargetFramework)' == 'netstandard2.1'">
<!-- PolySharp supplies compile-time language polyfills ([ModuleInitializer], nullable attributes). -->
<PackageReference Include="PolySharp" PrivateAssets="all" />
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" />
<PackageReference Include="System.Threading.Channels" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
<!-- netstandard2.0 additionally lacks Span/Memory and ValueTask in-box. -->
<PackageReference Include="System.Memory" />
<PackageReference Include="System.Threading.Tasks.Extensions" />
</ItemGroup>
<!-- ───────────────────────────── README into package ───────────────────────────── -->
<ItemGroup Condition="'$(_IsProductionLibrary)' == 'true'">
<None Include="$(MSBuildThisFileDirectory)README.md" Pack="true" PackagePath="\" Visible="false" />
</ItemGroup>
</Project>