.NET analyzers typically run during the build process, not when you directly run the application.
If you're using Visual Studio 2022 version 17.4 or later, you can enable Roslyn Analyzers to run during debugging. Here's how:
- Go to Tools > Options > Text Editor > Code Analysis.
- Check the box for "Enable Roslyn analyzers during debugging." ========== Ensure you have the latest version of the .NET SDK installed.
- Some analyzers might require specific configuration to enable code lens features. Refer to the analyzer's documentation for details.