Morcatko / Morcatko.AspNetCore.JsonMergePatch

JsonMergePatch support for ASP.NET Core
MIT License
88 stars 21 forks source link

Referencing this package in .NET 6 produces a warning #50

Closed mediocresurgeon closed 1 year ago

mediocresurgeon commented 2 years ago

Problem: Referencing this package in .NET 6 causes a warning when compiling. When projects are configured to treat warnings as errors, such a project is unable to compile.

AD0001 Analyzer 'Microsoft.AspNetCore.Mvc.Analyzers.TopLevelParameterNameAnalyzer' threw an exception of type 'System.NullReferenceException' with message 'Object reference not set to an instance of an object.'

To Reproduce:


**Known workarounds:**

- Add the following snippet to the .csproj file to ignore the warning:

```xml
<PropertyGroup>
  <NoWarn>AD0001</NoWarn>
  <WarningsNotAsErrors>$(NoWarn);</WarningsNotAsErrors>
</PropertyGroup>