C#/WinRT provides Windows Runtime (WinRT) API projection support for C#. A projection is an adapter that lets developers use WinRT APIs naturally in their language of choice. The C#/WinRT projection abstracts interop details and maps WinRT types to their .NET equivalents, such as strings, URIs, value types, and generic collections.
C#/WinRT includes tools that:
- Generate C# source for consuming WinRT APIs from
*.winmdfiles - Generate
*.winmdfiles for authoring WinRT components
Generated C# source can be compiled into interop assemblies, similar to how C++/WinRT produces headers for C++. This design removes the need for the C# compiler or .NET runtime to have built-in WinRT support.
- Usage guide
- Customizing C#/WinRT
- NativeAOT and Trimming support
- Authoring C#/WinRT components
- About WinRT.Host.dll
- C#/WinRT version history
- Repository structure
- COM Interop guide
- Related projects
For additional documentation and walkthroughs, visit https://aka.ms/cswinrt.
We welcome feedback and contributions! We ask that before you start work on a feature that you would like to contribute, please read our Contributor's Guide.
This project has adopted the Microsoft Open Source Code of Conduct.
For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.