When the library is used with a netstandard2.0 project the generated code from the cshtml files cannot be built as the property DiagnosticId of the Obsolete attribute was introduced in net5.
The build log:
Build started...
1>------ Build started: Project: ***********.csproj, Configuration: Debug Any CPU ------
1>C:\****************\RazorBlade.Analyzers\RazorBlade.Analyzers.RazorBladeSourceGenerator\************.RazorBlade.g.cs(17,95,17,107): error CS0246: The type or namespace name 'DiagnosticId' could not be found (are you missing a using directive or an assembly reference?)
1>C:\****************\RazorBlade.Analyzers\RazorBlade.Analyzers.RazorBladeSourceGenerator\************.RazorBlade.g.cs(23,95,23,107): error CS0246: The type or namespace name 'DiagnosticId' could not be found (are you missing a using directive or an assembly reference?)
1>Done building project "***********.csproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
========== Elapsed 00:00,453 ==========
When the library is used with a netstandard2.0 project the generated code from the cshtml files cannot be built as the property
DiagnosticId
of theObsolete
attribute was introduced in net5.The build log: