79203569

Date: 2024-11-19 13:20:52
Score: 1.5
Natty:
Report link

The project requires being built using .Net Standard 2.0 as a framework. Any newer framework will make any generators unable to run.

Switching my existing .Net 8 project failed to get the analyzers to run so instead I created a new project and followed Andrew Lock's guide (found here: https://andrewlock.net/creating-a-source-generator-part-1-creating-an-incremental-source-generator/) to format the .csproj file, re-added the generators from my previous project and included this new project as a reference in the project that contains the attribute it looks for. After these steps it was able to analyze the project and output the expected code.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Lachlan