This changes the behavior of the build to allow warnings without failing during local development. That means things like "elements should be documented" will not fail the build on a developer's machine and will allow testing and running to continue.
Warnings will still be treated as errors for release builds as executed by the GitHub Actions CI build. Individual developers can replicate the behavior by specifying the build configuration: dotnet build --configuration Release.
Wrap warnings as errors properties in a conditional property group
Updated readme
Took the chance to specify MSBuildTreatWarningsAsErrors as recommended by @lugolven
Verification
Wrote a method that created some warnings and observed the warnings did NOT cause a failure with dotnet build but do cause failures with dotnet build --configuration Release
Description
This changes the behavior of the build to allow warnings without failing during local development. That means things like "elements should be documented" will not fail the build on a developer's machine and will allow testing and running to continue.
Warnings will still be treated as errors for release builds as executed by the GitHub Actions CI build. Individual developers can replicate the behavior by specifying the build configuration:
dotnet build --configuration Release
.This comes from a @lugolven recommendation here: https://github.com/CBielstein/APRSsharp/pull/19#discussion_r445873420
Changes
MSBuildTreatWarningsAsErrors
as recommended by @lugolvenVerification
dotnet build
but do cause failures withdotnet build --configuration Release