Skip to content

[release-notes] C# in .NET 11 Preview 5#10426

Draft
danroth27 wants to merge 2 commits into
release-notes/11.0-preview5from
release-notes/11.0-preview5-csharp
Draft

[release-notes] C# in .NET 11 Preview 5#10426
danroth27 wants to merge 2 commits into
release-notes/11.0-preview5from
release-notes/11.0-preview5-csharp

Conversation

@danroth27
Copy link
Copy Markdown
Member

C# release notes for .NET 11 Preview 5.

This component PR targets the base milestone branch release-notes/11.0-preview5 (umbrella PR: #10421). Review and edit the markdown here in isolation — when this PR merges into the base branch, the changes roll up into the umbrella PR.

Draft generated with the release-notes skill in this repo. Verify feature selection, code samples, API names, and contributor attributions before marking ready for review.

Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@danroth27 danroth27 added area-release-notes automation Created by automated repository workflows/agents. labels May 28, 2026
Comment on lines +70 to +82
In this preview, projects that declare unions need the compiler support types available to the compilation:

```csharp
namespace System.Runtime.CompilerServices;

[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, AllowMultiple = false)]
public sealed class UnionAttribute : Attribute { }

public interface IUnion
{
object? Value { get; }
}
```
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tagging @eiriktsarpalis

I had a notification that these types are now in the .NET 11 Preview 5 libraries, and projects no longer need to provide polyfills. Can you confirm or correct?

Related: Is System.Runtime.CompilerServices the correct namespace after API review (for both UnionAttribute and IUnion).

Comment on lines +35 to +42
In this preview, projects that define closed classes also need the compiler support attribute available to the compilation:

```csharp
namespace System.Runtime.CompilerServices;

[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)]
public sealed class ClosedAttribute : Attribute { }
```
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eiriktsarpalis

My understanding is that this hasn't gone through API review yet, so this polyfill is necessary. Can you confirm?

This is the first preview where we're talking about unsafe evolution.

Talk about the feature, and then add only the changes in preview 5.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-release-notes automation Created by automated repository workflows/agents.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants