Skip to content

Commit 2c76c7e

Browse files
authored
Publish the V12 alpha standard (#55428)
* Publish the V12 alpha standard Update the publishing config to use the V12 alpha branch instead of the V11 branch. As part of that work, remove the feature speclets for all the version 12 features. Manage any broken links from those changes. * fix branch name. * Fix warnings Update links to the standard to the updated bookmarks for a given feature.
1 parent 9d5b67a commit 2c76c7e

19 files changed

Lines changed: 30 additions & 67 deletions

File tree

.openpublishing.publish.config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
{
5656
"path_to_root": "_csharpstandard",
5757
"url": "https://github.com/dotnet/csharpstandard",
58-
"branch": "v11-alpha",
58+
"branch": "alpha-v12",
5959
"include_in_build": true,
6060
"branch_mapping": {}
6161
},

docfx.json

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@
4949
},
5050
{
5151
"files": [
52-
"csharp-12.0/*.md",
5352
"csharp-13.0/*.md",
5453
"csharp-14.0/*.md",
5554
"csharp-15.0/*.md",
@@ -503,8 +502,7 @@
503502
"docs/visual-basic/**/**.{md,yml}": "wiwagn"
504503
},
505504
"ms.date": {
506-
"_csharpstandard/standard/*.md": "09/12/2025",
507-
"_csharplang/proposals/csharp-12.0/*.md": "08/15/2023",
505+
"_csharpstandard/standard/*.md": "08/12/2026",
508506
"_csharplang/proposals/csharp-13.0/*.md": "10/31/2024",
509507
"_csharplang/proposals/csharp-14.0/*.md": "08/06/2025",
510508
"_csharplang/proposals/csharp-15.0/*.md": "08/12/2026",
@@ -617,13 +615,6 @@
617615
"_csharpstandard/standard/standard-library.md": "Standard library",
618616
"_csharpstandard/standard/documentation-comments.md": "Documentation comments",
619617
"_csharpstandard/standard/Bibliography.md": "Bibliography",
620-
"_csharplang/proposals/csharp-12.0/primary-constructors.md": "Primary constructors",
621-
"_csharplang/proposals/csharp-12.0/using-alias-types.md": "Alias any type",
622-
"_csharplang/proposals/csharp-12.0/lambda-method-group-defaults.md": "Optional and parameter array parameters for lambdas and method groups",
623-
"_csharplang/proposals/csharp-12.0/inline-arrays.md": "Inline arrays, or fixed sized buffers",
624-
"_csharplang/proposals/csharp-12.0/collection-expressions.md": "Collection expressions",
625-
"_csharplang/proposals/csharp-12.0/experimental-attribute.md": "Experimental attribute",
626-
"_csharplang/proposals/csharp-12.0/ref-readonly-parameters.md": "Ref readonly parameters",
627618
"_csharplang/proposals/csharp-13.0/collection-expressions-better-conversion.md": "Better conversion from collection expression",
628619
"_csharplang/proposals/csharp-13.0/esc-escape-sequence.md": "String/Character escape sequence '\\e'",
629620
"_csharplang/proposals/csharp-13.0/lock-object.md": "Obey lock object semantics for lock statements",
@@ -704,13 +695,6 @@
704695
"_csharpstandard/standard/standard-library.md": "This appendix lists requirements of the specification library. The C# language relies on these types for some of its behavior.",
705696
"_csharpstandard/standard/documentation-comments.md": "This appendix describes XML comments that are used to document your program.",
706697
"_csharpstandard/standard/Bibliography.md": "This appendix lists external standards referenced in this specification.",
707-
"_csharplang/proposals/csharp-12.0/primary-constructors.md": "Primary constructors put the parameters of one constructor in scope for the whole class or struct to be used for initialization or directly as object state. The trade-off is that any other constructors must call through the primary constructor.",
708-
"_csharplang/proposals/csharp-12.0/using-alias-types.md": "Using directives can alias any type, not just named types. You can create aliases for tuple types, generics and more.",
709-
"_csharplang/proposals/csharp-12.0/lambda-method-group-defaults.md": "Optional and parameter array parameters for lambdas and method groups",
710-
"_csharplang/proposals/csharp-12.0/inline-arrays.md": "Inline arrays provide a general-purpose and safe mechanism for declaring inline arrays within C# classes, structs, and interfaces.",
711-
"_csharplang/proposals/csharp-12.0/collection-expressions.md": "Collection expressions provide a concise syntax to initialize collections by defining elements or embedded collections as the source of the new collection's elements.",
712-
"_csharplang/proposals/csharp-12.0/experimental-attribute.md": "Use the ExperimentalAttribute attribute to indicate APIs that aren't stable.",
713-
"_csharplang/proposals/csharp-12.0/ref-readonly-parameters.md": "Ref readonly parameters enforce that arguments are passed by references, where `in` parameters allow the compiler some flexibiility.",
714698
"_csharplang/proposals/csharp-13.0/collection-expressions-better-conversion.md": "Conversions from collection expressions match the element type before matching the collection type.",
715699
"_csharplang/proposals/csharp-13.0/esc-escape-sequence.md" : "The sequence '\\e' is now interpreted as the 'ESC' character, character point '0x1b'",
716700
"_csharplang/proposals/csharp-13.0/lock-object.md": "Special-case how `System.Threading.Lock` interacts with the `lock` keyword by calling its `EnterScope` method. Add static analysis warnings to prevent accidental misuse of the type where possible.",
@@ -760,7 +744,6 @@
760744
"titleSuffix": {
761745
"docs/**/*.{md,yml}": ".NET",
762746
"_csharpstandard/standard/*.md": "C# language specification",
763-
"_csharplang/proposals/csharp-12.0/*.md": "C# feature specifications",
764747
"_csharplang/proposals/csharp-13.0/*.md": "C# feature specifications",
765748
"_csharplang/proposals/csharp-14.0/*.md": "C# feature specifications",
766749
"_csharplang/proposals/csharp-15.0/*.md": "C# feature specifications",

docs/csharp/language-reference/attributes/general.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ Beginning in C# 12, types, methods, and assemblies can be marked with the <xref:
7777
> [!WARNING]
7878
> Experimental features are subject to changes. The APIs can change, or they can be removed in future updates. Including experimental features is a way for library authors to get feedback on ideas and concepts for future development. Use extreme caution when using any feature marked as experimental. You can learn more about how APIs are marked as experimental in our article on [preview APIs](../../../fundamentals/runtime-libraries/preview-apis.md#experimentalattribute).
7979
80-
You can read more details about the `Experimental` attribute in the [feature specification](~/_csharplang/proposals/csharp-12.0/experimental-attribute.md).
80+
You can read more details about the `Experimental` attribute in the [feature specification](https://github.com/dotnet/csharplang/blob/main/proposals/csharp-12.0/experimental-attribute.md).
8181

8282
The Windows Foundation Metadata libraries use the <xref:Windows.Foundation.Metadata.ExperimentalAttribute?displayProperty=nameWithType>, which predates C# 12.
8383

docs/csharp/language-reference/builtin-types/default-values.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ For more information, see the following sections of the [C# language specificati
5757

5858
- [Default values](~/_csharpstandard/standard/variables.md#93-default-values)
5959
- [Default constructors](~/_csharpstandard/standard/types.md#833-default-constructors)
60-
- [Parameterless struct constructors](~/_csharpstandard/standard/structs.md#1669-constructors)
61-
- [Auto default structs](~/_csharpstandard/standard/structs.md#16681-field-initializers)
60+
- [Parameterless struct constructors](~/_csharpstandard/standard/structs.md#1689-constructors)
61+
- [Auto default structs](~/_csharpstandard/standard/structs.md#16881-field-initializers)
6262

6363
## See also
6464

docs/csharp/language-reference/builtin-types/ref-struct.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,9 @@ The compiler enforces these restrictions. If you write `ref struct` types that i
8585
For more information, see the following sections of the [C# language specification](~/_csharpstandard/standard/README.md):
8686

8787
- [Structs: Ref modifier](~/_csharpstandard/standard/structs.md#1623-ref-modifier)
88-
- [Safe context constraint for ref struct types](~/_csharpstandard/standard/structs.md#16615-safe-context-constraint)
88+
- [Safe context constraint for ref struct types](~/_csharpstandard/standard/structs.md#16815-safe-context-constraint)
8989

90-
For more information about `ref` fields, see [Ref fields](~/_csharpstandard/standard/structs.md#16682-ref-fields) in the C# language specification.
90+
For more information about `ref` fields, see [Ref fields](~/_csharpstandard/standard/structs.md#16882-ref-fields) in the C# language specification.
9191

9292
## See also
9393

docs/csharp/language-reference/builtin-types/struct.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ But it can be any reference type, or any value type:
114114

115115
You can use inline arrays with almost any C# data structure.
116116

117-
Inline arrays are an advanced language feature. They're intended for high-performance scenarios where an inline, contiguous block of elements is faster than other alternative data structures. You can learn more about inline arrays from the [feature spec](~/_csharplang/proposals/csharp-12.0/inline-arrays.md).
117+
Inline arrays are an advanced language feature. They're intended for high-performance scenarios where an inline, contiguous block of elements is faster than other alternative data structures. You can learn more about inline arrays from [§16.6 Inline arrays](~/_csharpstandard/standard/structs.md#166-inline-arrays) in the C# standard.
118118

119119
## Struct initialization and default values
120120

@@ -140,7 +140,7 @@ If you don't initialize all fields in a struct, the compiler adds code to the co
140140

141141
:::code language="csharp" source="snippets/shared/StructType.cs" id="FieldInitializer":::
142142

143-
Every `struct` has a `public` parameterless constructor. If you write a parameterless constructor, it must be public. If a struct declares any field initializers, it must explicitly declare a constructor. That constructor need not be parameterless. If a struct declares a field initializer but no constructors, the compiler reports an error. Any explicitly declared constructor (with parameters, or parameterless) executes all field initializers for that struct. All fields without a field initializer or an assignment in a constructor are set to the [default value](default-values.md). For more information, see the [C# language specification—Constructors](~/_csharpstandard/standard/structs.md#1669-constructors).
143+
Every `struct` has a `public` parameterless constructor. If you write a parameterless constructor, it must be public. If a struct declares any field initializers, it must explicitly declare a constructor. That constructor need not be parameterless. If a struct declares a field initializer but no constructors, the compiler reports an error. Any explicitly declared constructor (with parameters, or parameterless) executes all field initializers for that struct. All fields without a field initializer or an assignment in a constructor are set to the [default value](default-values.md). For more information, see the [C# language specification—Constructors](~/_csharpstandard/standard/structs.md#1689-constructors).
144144

145145
Beginning with C# 12, `struct` types can define a [primary constructor](../../programming-guide/classes-and-structs/instance-constructors.md#primary-constructors) as part of its declaration. Primary constructors provide a concise syntax for constructor parameters that can be used throughout the `struct` body, in any member declaration for that struct.
146146

@@ -176,11 +176,11 @@ For more information, see the [Structs](~/_csharpstandard/standard/structs.md) s
176176

177177
- [Readonly structs](~/_csharpstandard/standard/structs.md#1622-struct-modifiers)
178178
- [Readonly instance members](~/_csharpstandard/standard/structs.md#163-struct-members)
179-
- [Parameterless struct constructors](~/_csharpstandard/standard/structs.md#1669-constructors)
179+
- [Parameterless struct constructors](~/_csharpstandard/standard/structs.md#1689-constructors)
180180
- [Allow `with` expression on structs](~/_csharpstandard/standard/expressions.md#1210-with-expressions)
181-
- [Record structs](~/_csharpstandard/standard/structs.md#164-record-structs)
181+
- [Record structs](~/_csharpstandard/standard/structs.md#165-record-structs)
182182

183-
You can also read about [Auto default structs](~/_csharpstandard/standard/structs.md#16681-field-initializers) in the C# language specification.
183+
You can also read about [Auto default structs](~/_csharpstandard/standard/structs.md#16881-field-initializers) in the C# language specification.
184184

185185
## See also
186186

docs/csharp/language-reference/compiler-messages/ref-modifiers-errors.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ To correct these errors:
268268
- Remove the `unscoped` modifier or the <xref:System.Diagnostics.CodeAnalysis.UnscopedRefAttribute?displayProperty=nameWithType> attribute from struct constructors and init-only members. These members have special initialization semantics where the compiler must ensure that any references don't outlive the initialization phase, and allowing unscoped references would violate the guarantee that initialization completes before the struct becomes fully accessible (**CS9101**).
269269
- Remove the `unscoped` modifier from interface implementation methods when the corresponding interface method doesn't have it. The unscoped characteristic affects the method's contract regarding reference lifetime guarantees, and implementations must maintain the same contract as the interface they're implementing to ensure callers can rely on consistent lifetime behavior regardless of which implementation is invoked (**CS9102**).
270270

271-
For more information about scoped and unscoped references, see [Method parameters](../keywords/method-parameters.md) and [Safe context constraint](~/_csharpstandard/standard/structs.md#16615-safe-context-constraint) in the C# language specification.
271+
For more information about scoped and unscoped references, see [Method parameters](../keywords/method-parameters.md) and [Safe context constraint](~/_csharpstandard/standard/structs.md#16815-safe-context-constraint) in the C# language specification.
272272

273273
## Reference variables require a referent
274274

docs/csharp/language-reference/keywords/using-directive.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ The following example shows how to define a `using` directive and a `using` alia
168168

169169
:::code language="csharp" source="./snippets/csrefKeywordsNamespace2.cs" id="Snippet9":::
170170

171-
Beginning with C# 12, you can create aliases for types that were previously restricted, including [tuple types](../builtin-types/value-tuples.md#tuple-field-names), pointer types, and other unsafe types. For more information on the updated rules, see the [feature spec](~/_csharplang/proposals/csharp-12.0/using-alias-types.md).
171+
Beginning with C# 12, you can create aliases for types that were previously restricted, including [tuple types](../builtin-types/value-tuples.md#tuple-field-names), pointer types, and other unsafe types. For more information on the updated rules, see [§14.6.2 Using alias directives](~/_csharpstandard/standard/namespaces.md#1462-using-alias-directives) in the C# standard.
172172

173173
## Qualified alias member
174174

docs/csharp/language-reference/operators/collection-expressions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,15 @@ You can convert a *collection expression* to different collection types, includi
5656
>
5757
> This behavior is distinct from LINQ, where a sequence might not be instantiated until it is enumerated. You can't use collection expressions to generate an infinite sequence that won't be enumerated.
5858
59-
The compiler uses static analysis to determine the most performant way to create the collection declared with a collection expression. For example, the empty collection expression, `[]`, can be realized as <xref:System.Array.Empty``1?displayProperty=nameWithType> if the target won't be modified after initialization. When the target is a <xref:System.Span`1?displayProperty=nameWithType> or <xref:System.ReadOnlySpan`1?displayProperty=nameWithType>, the storage might be stack allocated. The [collection expressions feature specification](~/_csharplang/proposals/csharp-12.0/collection-expressions.md) specifies the rules the compiler must follow.
59+
The compiler uses static analysis to determine the most performant way to create the collection declared with a collection expression. For example, the empty collection expression, `[]`, can be realized as <xref:System.Array.Empty``1?displayProperty=nameWithType> if the target won't be modified after initialization. When the target is a <xref:System.Span`1?displayProperty=nameWithType> or <xref:System.ReadOnlySpan`1?displayProperty=nameWithType>, the storage might be stack allocated. The [§12.8.25 Collection expressions](~/_csharpstandard/standard/expressions.md#12825-collection-expressions) clause of the C# standard specifies the rules the compiler must follow.
6060

6161
Many APIs are overloaded with multiple collection types as parameters. Because a collection expression can be converted to many different expression types, these APIs might require casts on the collection expression to specify the correct conversion. The following conversion rules resolve some of the ambiguities:
6262

6363
- A better element conversion is preferred over a better collection type conversion. In other words, the type of elements in the collection expression has more importance than the type of the collection. These rules are described in the feature spec for [better conversion from collection expression](~/_csharplang/proposals/csharp-13.0/collection-expressions-better-conversion.md).
6464
- Conversion to <xref:System.Span`1>, <xref:System.ReadOnlySpan`1>, or another [`ref struct`](../builtin-types/ref-struct.md) type is better than a conversion to a non-ref struct type.
6565
- Conversion to a noninterface type is better than a conversion to an interface type.
6666

67-
When you convert a collection expression to a `Span` or `ReadOnlySpan`, the span object's *safe context* comes from the *safe context* of all elements included in the span. For detailed rules, see the [Collection expression specification](~/_csharplang/proposals/csharp-12.0/collection-expressions.md#ref-safety).
67+
When you convert a collection expression to a `Span` or `ReadOnlySpan`, the span object's *safe context* comes from the *safe context* of all elements included in the span. For detailed rules, see [§9.7.2 Ref safe contexts](~/_csharpstandard/standard/variables.md#972-ref-safe-contexts) in the C# standard.
6868

6969
## Collection builder
7070

docs/csharp/language-reference/operators/equality-operators.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ public virtual bool Equals(T? other);
106106

107107
For more information, see the [Relational and type-testing operators](~/_csharpstandard/standard/expressions.md#1215-relational-and-type-testing-operators) section of the [C# language specification](~/_csharpstandard/standard/README.md).
108108

109-
For more information about equality of record types, see the [Equality members](~/_csharpstandard/standard/classes.md#151663-equality-members) section of the [C# language specification](~/_csharpstandard/standard/README.md).
109+
For more information about equality of record types, see the [Equality members](~/_csharpstandard/standard/classes.md#151643-equality-members) section of the [C# language specification](~/_csharpstandard/standard/README.md).
110110

111111
## See also
112112

0 commit comments

Comments
 (0)