Skip to content

Document C# diagnostics: signing configuration and friend assemblies #56417

Open

Description

@BillWagner

Summary

Combine the approved signing configuration failures and friend-assembly identity/public-key themes into one documentation work item.

The core scope is 11 diagnostics remaining in the explicitly labeled C# 6 diagnostics section of docs/csharp/misc/sorry-we-don-t-have-specifics-on-this-csharp-error.md. These share assembly identity, key material, and compatible signing configuration as their remediation area.

Use focused thematic coverage, not an unrelated compiler-errors collection. The proposed destinations are assembly-signing-errors.md and friend-assembly-errors.md under docs/csharp/language-reference/compiler-messages/; audit existing homes before finalizing the article split. Combining the work into one issue does not require merging distinct remediation sections into one article.

Core scope: 11 diagnostics

Signing configuration: 9 diagnostics

Code Cause and remediation theme
CS7027 Signing with a public key from a file failed; address the nested error and key-file configuration.
CS7028 Signing with a public key from a key container failed; address the nested error and container configuration.
CS7032 The key file lacks the private key required for signing.
CS7033 Delay signing requires a public key, but none was specified.
CS7091 An attribute in source conflicts with a compiler option.
CS8002 A referenced assembly does not have a strong name.
CS8003 AssemblySignatureKeyAttribute specifies an invalid signature public key.
CS8102 Public signing requires a public key, but none was specified.
CS8105 An attribute is ignored when public signing is specified.

Explain valid key material, consistent signing options, source-attribute/option conflicts, and the applicable compiler/platform distinctions. Do not characterize strong naming as a security boundary.

Friend assemblies: 2 diagnostics

Code Cause and remediation theme
CS7029 The granting assembly and output assembly have incompatible strong-name signing states.
CS7030 The friend assembly name is null.

Explain how friend names, public keys, and signing states must agree between granting and consuming assemblies.

Related consolidation candidates

Review existing standalone coverage for CS0281, CS1700, and CS1726 alongside the friend-assembly work. These are three adjacent candidates in addition to the 11-code core, not three newly undocumented diagnostics. Confirm scope before retiring their articles.

In particular, coordinate CS0281 work with #32996 instead of duplicating its fix. The current resource describes a public-key mismatch; its existing article's output-name wording needs review.

Related issues

Do not close or alter related issues automatically. Reconcile their acceptance criteria and link any eventual implementing PR appropriately.

Acceptance criteria

  • Verify every included diagnostic and current message against Roslyn ErrorCode.cs, CSharpResources.resx, emitting code, and tests.
  • Finalize primary thematic homes after checking existing standalone and multi-code owners.
  • Document the 11 core diagnostics with concise causes and corrective actions, grouping similar remedies.
  • Clearly distinguish normal signing, delay signing, public signing, friend identity, and public-key mismatch.
  • Preserve platform and compiler-version constraints; avoid treating strong names as security guarantees.
  • Synchronize master lists, f1_keywords, helpviewer_keywords, and TOC display names; remove specifically covered core codes from the catch-all.
  • If adjacent standalone consolidation is approved, preserve useful remediation/examples, add redirects, update the TOC and inbound links, and provide a merge-preservation log. Up to three standalone articles could be retired.
  • Validate examples and metadata/ownership consistency, links, redirects where applicable, and Markdown formatting.

Historical commented-out CS1548 and CS1699 are excluded. A separate historical-page retirement policy is not part of this issue.

Investigation baseline

Docs: c13b5e4e1a47bcff4e7e2403ee5959d0d58dbeb0.
Roslyn: fe6e2362fac9f83588271b05f78e6ce651fc0502.
Recheck ownership and related-issue status before implementation.

Metadata

Metadata

Assignees

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions