-
Notifications
You must be signed in to change notification settings - Fork 6k
Enhance CS0012 documentation with troubleshooting steps for when assemblies appear to be referenced #47632
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…eferenced Co-authored-by: BillWagner <493969+BillWagner@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This LGTM and is ready for final review.
docs/csharp/language-reference/compiler-messages/assembly-references.md
Outdated
Show resolved
Hide resolved
docs/csharp/language-reference/compiler-messages/assembly-references.md
Outdated
Show resolved
Hide resolved
docs/csharp/language-reference/compiler-messages/assembly-references.md
Outdated
Show resolved
Hide resolved
docs/csharp/language-reference/compiler-messages/assembly-references.md
Outdated
Show resolved
Hide resolved
docs/csharp/language-reference/compiler-messages/assembly-references.md
Outdated
Show resolved
Hide resolved
Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com>
PoliCheck Scan ReportThe following reports lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 issues. Other issues are also a high priority. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a comment that you post to the PR. The feedback helps reduce false positive instances in future scans. ✅ No issues foundMore information about PoliCheckInformation: PoliCheck | Severity Guidance | Term |
The current CS0012 compiler error documentation doesn't address scenarios where the assembly appears to be referenced in the project but the compiler error persists. This enhancement adds a dedicated troubleshooting section to help developers resolve CS0012 errors that occur after NuGet package operations or when references seem to exist but are not properly resolved.
Changes Made
Added a new "When the assembly appears to be referenced" subsection to the CS0012 documentation that provides step-by-step troubleshooting guidance:
dotnet restore
after package operationsProblem Addressed
This addresses user feedback about encountering CS0012 errors for
System.ServiceModel.ClientBase<>
after NuGet uninstall/reinstall operations, where the dependency appeared to be present but the compiler couldn't resolve it. The enhanced documentation now provides concrete steps to resolve these common post-package-operation scenarios.Example Scenario
A developer receives this error after NuGet operations:
With the updated documentation, they now have clear steps to resolve the issue even when the assembly appears to be referenced.
Fixes #28000.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.
Internal previews