-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDirectory.Build.props
More file actions
41 lines (38 loc) · 1.65 KB
/
Directory.Build.props
File metadata and controls
41 lines (38 loc) · 1.65 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
<Project>
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<Nullable>enable</Nullable>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<!-- C# specific settings -->
<PropertyGroup Condition="'$(MSBuildProjectExtension)' == '.csproj'">
<ImplicitUsings>enable</ImplicitUsings>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<AnalysisLevel>latest-all</AnalysisLevel>
<WarningLevel>9999</WarningLevel>
<!-- Suppress pedantic analyzer rules -->
<NoWarn>
CA1515;<!-- Types should be internal (not applicable for apps) -->
CA1848;<!-- Use LoggerMessage.Define (perf optimization) -->
CA1307;<!-- Specify StringComparison (noisy for PathString) -->
CA1308;<!-- Use ToUpperInvariant -->
CA1054;<!-- Uri parameters should be Uri type -->
CA1056;<!-- Uri properties should be Uri type -->
CA2234;<!-- Pass Uri instead of string -->
CA1062;<!-- Validate parameters (nullable handles this) -->
CA2007;<!-- ConfigureAwait not needed in ASP.NET Core -->
CA1812 <!-- False positives with DI-instantiated classes -->
</NoWarn>
</PropertyGroup>
<!-- C# analyzers -->
<ItemGroup Condition="'$(MSBuildProjectExtension)' == '.csproj'">
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="9.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>
<!-- F# specific settings -->
<PropertyGroup Condition="'$(MSBuildProjectExtension)' == '.fsproj'">
<WarnOn>3390;$(WarnOn)</WarnOn>
</PropertyGroup>
</Project>