Skip to content

Commit

Permalink
Enable TreatWarningsAsErrors
Browse files Browse the repository at this point in the history
Enable TreatWarningsAsErrors in Directory.Build.props.
Exception is CS8981 (lowercase type names) in GrpcClient and
GrpcService projects because it is triggered by auto-generated
protobuf types.
  • Loading branch information
webwarrior-ws committed Feb 12, 2024
1 parent 4209e06 commit ba425b0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<Project>
<PropertyGroup>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
</Project>
1 change: 1 addition & 0 deletions src/FX.GrpcClient/FX.GrpcClient.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<WarningsNotAsErrors>$(WarningsNotAsErrors);CS8981</WarningsNotAsErrors>
</PropertyGroup>

<ItemGroup>
Expand Down
1 change: 1 addition & 0 deletions src/FX.GrpcService/FX.GrpcService.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<WarningsNotAsErrors>$(WarningsNotAsErrors);CS8981</WarningsNotAsErrors>
</PropertyGroup>

<ItemGroup>
Expand Down

0 comments on commit ba425b0

Please sign in to comment.