Installation and Setup Issues
CommentSense diagnostics are not appearing
CommentSense diagnostics are not appearing
CSENSE000: XML documentation parsing is disabled
CSENSE000: XML documentation parsing is disabled
<GenerateDocumentationFile>true</GenerateDocumentationFile> in the .csproj.Solution:Add the required property to your project file:Directory.Build.props file:I still see CS1591 compiler warnings
I still see CS1591 compiler warnings
<NoWarn> entries.Solution:-
Remove manual suppressions from
.csproj: -
Verify the suppressor is loaded:
The
CommentSenseSuppressorshould automatically suppress CS1591, CS1573, etc. Check that:- CommentSense is properly installed
- Your SDK version supports
DiagnosticSuppressor(requires .NET 5+ SDK or Visual Studio 2019 16.9+)
-
Check conditional suppression settings:
If you have
comment_sense.enable_conditional_suppression = true, some warnings may intentionally show for excluded members.
Configuration Issues
My .editorconfig settings are not being applied
My .editorconfig settings are not being applied
.editorconfig don’t affect CommentSense behavior.Solutions:How do I disable a specific rule?
How do I disable a specific rule?
.editorconfig or .globalconfig to set severity:none, silent, suggestion, warning, errorConfiguration works locally but not in CI
Configuration works locally but not in CI
.editorconfignot committed to source control- CI environment uses different SDK version
- Build script overrides settings
-
Commit
.editorconfigto git: -
Verify SDK version in CI matches local:
-
Check for
<NoWarn>or<TreatWarningsAsErrors>in CI-specific props files
Code Fix Issues
Code fixes are not appearing
Code fixes are not appearing
-
Check diagnostic severity: Code fixes only appear for diagnostics with
warningorerrorseverity (notsuggestionornone). - Verify cursor position: Place the cursor directly on the diagnostic (usually the member name).
- Use the keyboard shortcut: Press Ctrl + . (or Alt + Enter in some IDEs) to explicitly invoke the code fix menu.
- Restart the IDE: Sometimes the code fix provider needs a reload.
Fix All is not working as expected
Fix All is not working as expected
- Multiple diagnostics on the same member: CommentSense groups diagnostics by member and applies them together. If fixes conflict, some may not apply. Solution: Apply fixes one at a time, or review the Fix All preview.
-
Fix All scope:
Ensure you’re using the right scope:
- Fix All in Document: Current file only
- Fix All in Project: All files in current project
- Fix All in Solution: All projects
- Files with syntax errors: Fix All skips files with compilation errors. Solution: Fix syntax errors first, then run Fix All.
Fix generates invalid XML or breaks formatting
Fix generates invalid XML or breaks formatting
- Report a bug: Include the original code and the fix result
- Workaround: Undo the fix (Ctrl+Z) and apply manually
- Check for mixed comment styles: Ensure you’re using either
///(single-line) or/** */(multi-line), not both
Performance Issues
IDE is slow with CommentSense enabled
IDE is slow with CommentSense enabled
- Disable live analysis for large files: In Visual Studio: Tools → Options → Text Editor → C# → Advanced → Enable full solution analysis → Uncheck
-
Reduce visibility level:
Analyze fewer members:
-
Exclude member types:
-
Disable expensive rules:
Build is slow in CI/CD
Build is slow in CI/CD
-
Use incremental builds:
- Run analyzers only on changed files (advanced): Use build caching and only analyze modified files.
-
Disable analyzers in Debug builds:
Diagnostic Interpretation
CSENSE016: What makes documentation 'low quality'?
CSENSE016: What makes documentation 'low quality'?
- Empty or whitespace-only content
- Forbidden terms (default: none, configurable)
- Too short (default: no minimum, configurable)
- Missing capitalization (if
require_capitalization = true) - Missing ending punctuation (if
require_ending_punctuation = true) - Too similar to member name (if
similarity_threshold > 0)
CSENSE012: Why is my exception not detected?
CSENSE012: Why is my exception not detected?
-
Exception is ignored by configuration:
-
Exception is thrown in a called method:
By default, CommentSense only scans the current method. Enable deep scanning:
- Exception is thrown indirectly (e.g., via delegates, LINQ, reflection): CommentSense cannot detect all indirect throws. Document these manually.
CSENSE025: Accessibility mismatch on cref
CSENSE025: Accessibility mismatch on cref
cref points to a symbol with lower accessibility.Example:- Change the reference to a public type
- Remove the reference if it’s not essential
-
Suppress the warning if the reference is intentional:
Compatibility Issues
What .NET SDK versions are supported?
What .NET SDK versions are supported?
- .NET 5 SDK or later (for
DiagnosticSuppressorsupport) - C# 9.0 or later
- Upgrade to .NET 5+ SDK
- You can still target older frameworks (e.g.,
<TargetFramework>net48</TargetFramework>)
Does CommentSense work with .NET Framework projects?
Does CommentSense work with .NET Framework projects?
Does CommentSense work in Rider, VS Code, or other IDEs?
Does CommentSense work in Rider, VS Code, or other IDEs?
- Visual Studio 2019/2022: Full support
- JetBrains Rider: Full support
- VS Code with C# extension: Full support
- Command line (dotnet build): Full support
Getting Help
Check the Rules Reference
Review Configuration Options
.editorconfig settings.Read Best Practices
Report an Issue
Diagnostic Checklist
If you’re experiencing issues, run through this checklist:Installation
- CommentSense NuGet package is installed
-
<GenerateDocumentationFile>true</GenerateDocumentationFile>is in.csproj - Solution builds without errors
Configuration
-
.editorconfigexists and is committed to source control -
.editorconfigsyntax is correct (no typos) - Configuration options match expected behavior
IDE
- IDE supports Roslyn analyzers
- Analyzers are enabled in IDE settings
- IDE has been restarted after installing CommentSense
Diagnostics
- Diagnostics appear in Error List
- Diagnostic severity is set correctly (warning/error, not none)
- Suppressed compiler warnings (CS1591, etc.) are hidden
Still Having Issues?
If you’ve tried everything and still have problems:-
Collect diagnostic information:
- CommentSense version
- .NET SDK version (
dotnet --version) - IDE and version
- Minimal reproducible example
- Search existing issues on the GitHub repository
-
Open a new issue with:
- Clear description of the problem
- Steps to reproduce
- Expected vs. actual behavior
- Diagnostic information from step 1
- CommentSense is not installed
- XML documentation generation is disabled
- The analyzer is disabled in project settings
- IDE analyzer support is turned off
Solutions:Verify Installation
Enable XML Documentation
.csproj:Check Analyzer Settings
Restart IDE