Make debug builds less strict

Release builds do more work and are stricter. This allows for faster
development: devs can be messy/experimental initially and verify their
code easily by running a build in Release mode, and we also enforce
stricter rules in CI with the Release configuration. We can also move
any slow actions to the Release configuration to speed up test runs, etc.
This commit is contained in:
Joe DeCock 2025-03-05 14:21:13 -06:00
parent 704d88f211
commit 7cbe23f94d
3 changed files with 34 additions and 3 deletions

View file

@ -3,10 +3,20 @@
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<IsPackable>false</IsPackable>
<WarnOnPackingNonPackableProject>false</WarnOnPackingNonPackableProject>
<ImplicitUsings>true</ImplicitUsings>
</PropertyGroup>
<!--Release builds do more work and are stricter. This allows for faster
development: devs can be messy/experimental initially and verify their
code easily by running a build in Release mode, and we also enforce
stricter rules in CI with the Release configuration. We can also move
any slow actions to the Release configuration to speed up test runs, etc.
-->
<PropertyGroup Condition="'$(Configuration)'=='Release'">
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
</Project>

View file

@ -16,9 +16,8 @@
<!-- <Nullable>enable</Nullable> -->
<LangVersion>latest</LangVersion>
<ImplicitUsings>true</ImplicitUsings>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<ContinuousIntegrationBuild Condition="'$(GITHUB_ACTIONS)' == 'true'">True</ContinuousIntegrationBuild>
<Deterministic>true</Deterministic>
<NoWarn>$(NoWarn);CS1591,NU1507</NoWarn>
@ -48,6 +47,18 @@
<PackageReadmePath>../../README.md</PackageReadmePath>
</PropertyGroup>
<!--Release builds do more work and are stricter. This allows for faster
development: devs can be messy/experimental initially and verify their
code easily by running a build in Release mode, and we also enforce
stricter rules in CI with the Release configuration. We can also move
any slow actions to the Release configuration to speed up test runs, etc.
-->
<PropertyGroup Condition="'$(Configuration)'=='Release'">
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub">
<PrivateAssets>all</PrivateAssets>

View file

@ -12,6 +12,16 @@
<NoWarn>$(NoWarn);NU1507</NoWarn>
</PropertyGroup>
<!--Release builds do more work and are stricter. This allows for faster
development: devs can be messy/experimental initially and verify their
code easily by running a build in Release mode, and we also enforce
stricter rules in CI with the Release configuration. We can also move
any slow actions to the Release configuration to speed up test runs, etc.
-->
<PropertyGroup Condition="'$(Configuration)'=='Release'">
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="coverlet.collector">
<PrivateAssets>all</PrivateAssets>