Skip to content

.NET and Native AOT improvements for CsWinRT 3.0 #114179

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

Open
11 of 25 tasks
Sergio0694 opened this issue Apr 2, 2025 · 10 comments
Open
11 of 25 tasks

.NET and Native AOT improvements for CsWinRT 3.0 #114179

Sergio0694 opened this issue Apr 2, 2025 · 10 comments
Labels
area-NativeAOT-coreclr area-System.Runtime.InteropServices Epic Groups multiple user stories. Can be grouped under a theme. partner-impact This issue impacts a partner who needs to be kept updated
Milestone

Comments

@Sergio0694
Copy link
Contributor

Sergio0694 commented Apr 2, 2025

This epic tracks all work items across .NET 10 and Native AOT, related to supporting CsWinRT. We're currently working on a new version (see CsWinRT/fhl/cswinrt-3.0) that will be built on top of .NET 10, and designed with trim/AOT as a first class citizen. We're also taking the opportunity to fix a number of known issues (both in terms of perf, binary size, memory use, and usability) that have accumulated in CsWinRT over time. Some of them would require new APIs or changes in .NET (and/or Native AOT), which are all linked here, so it's easier to see all of them at once. We're planning on adopting .NET 10 and CsWinRT 3.0 in the Microsoft Store, as well as in other inbox apps and Windows components.

Note

I'm listing both supporting work for CsWinRT 3.0, as well as general asks from the WinRT side in general (eg. PGO).

Runtime support

ComWrappers and COM generator APIs

Native AOT

Collections (nice to have)

Misc (nice to have)

Bugs (CoreCLR/AOT)

@Sergio0694 Sergio0694 added this to the 10.0.0 milestone Apr 2, 2025
@dotnet-issue-labeler dotnet-issue-labeler bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Apr 2, 2025
@Sergio0694 Sergio0694 added area-System.Runtime.InteropServices area-NativeAOT-coreclr partner-impact This issue impacts a partner who needs to be kept updated and removed needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels Apr 2, 2025
Copy link
Contributor

Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas
See info in area-owners.md if you want to be subscribed.

Copy link
Contributor

Tagging subscribers to this area: @dotnet/interop-contrib
See info in area-owners.md if you want to be subscribed.

Copy link
Contributor

Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas
See info in area-owners.md if you want to be subscribed.

Copy link
Contributor

Tagging subscribers to this area: @dotnet/interop-contrib
See info in area-owners.md if you want to be subscribed.

@jkoritzinsky jkoritzinsky added the Epic Groups multiple user stories. Can be grouped under a theme. label Apr 2, 2025
@agocke agocke modified the milestones: 10.0.0, Future Apr 3, 2025
@agocke
Copy link
Member

agocke commented Apr 3, 2025

It’s probably too late to start an epic for .NET 10. We can probably get some of these in, but some stuff may slip past .NET 10. In general, themes of this size should be discussed around the start of release planning in November.

@Sergio0694
Copy link
Contributor Author

Yup, that's completely fair. To clarify, we did discuss most of these early on (eg. the type map conversation has been going on for a while, and CsWinRT is not the only consumer), but we didn't think of creating a tracking epic for all these changes before. It's not a problem if not all of these get into .NET 10 (eg. I know we talked about the feature switch analyzer most likely slipping past .NET 10), but hopefully this at least helps to see all related changes in a single place (it certainly helps us with that too) 🙂

@agocke agocke changed the title .NET 10 and Native AOT improvements for CsWinRT 3.0 .NET and Native AOT improvements for CsWinRT 3.0 Apr 3, 2025
@jeromelaban
Copy link
Contributor

Thanks for putting this up, I'll add my concerns about CsWinRT 3.0 on two parts.

As long as cswinrt (or at least the default version) is bundled with the .NET SDK, this will cause a cascade of forced upgrades. For instance, 9.0.200 updated cswinrt, and this required consumer of nuget packages to also upgrade to 9.0.200., if the produced updated its build-time SDK. It is then not clear for developers that this dependency exists when using WinAppSDK, causing all sorts of confusion around why version mismatches happen and where/how to fix them (whether it's a nuget package producer or consumer problem).

If cswinrt stays part of the .NET SDK, adding breaking changes to cswinrt will cause a break in the ecosystem, requiring all the existing nuget packages to upgrade to that newer version. This generally takes a long while to happen.

In short, please don't break any APIs if you keep including cswinrt in the .NET SDK :)

@agocke
Copy link
Member

agocke commented Apr 3, 2025

As long as cswinrt (or at least the default version) is bundled with the .NET SDK,

I may be out of the loop here. Is CsWinRT part of the .Windows piece of the SDK? It's definitely not in the core framework...

@Sergio0694
Copy link
Contributor Author

Sergio0694 commented Apr 3, 2025

CsWinRT Is bundled as a targeting pack with the -windows TPM in the .NET SDK. But please let's not go off topic in this issue, this is only meant to track runtime/BCL additions for CsWinRT. We have not shared any exact plans for rolling out CsWinRT 3.0 at all, and it's something that can be discussed in a separate issue in th CsWinRT repo, not here 🙂

@michael-hawker
Copy link

CsWinRT Is bundled as a targeting pack with the -windows TPM in the .NET SDK. But please let's not go off topic in this issue, this is only meant to track runtime/BCL additions for CsWinRT. We have not shared any exact plans for rolling out CsWinRT 3.0 at all, and it's something that can be discussed in a separate issue in th CsWinRT repo, not here 🙂

Thanks for the clarification @Sergio0694, will you link to the CsWinRT issue when that gets filed (will that happen soon as work is underway on this project)? It'd be great if it could address some of the concerns raised here in the process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-NativeAOT-coreclr area-System.Runtime.InteropServices Epic Groups multiple user stories. Can be grouped under a theme. partner-impact This issue impacts a partner who needs to be kept updated
Projects
Status: No status
Development

No branches or pull requests

5 participants