Skip to content

Commit 12cf8b5

Browse files
Fix PR review feedback
- Restore broken YAML front matter in create-winrt-component-winui-cswinrt.md and create-windows-runtime-component-cswinrt.md (ms.topic, ms.localizationpriority, closing --- delimiter were missing) - Fix issue number text mismatch: 'Issue #1151' → 'Issue #1093' on AnyCPU known issue (URL already pointed to #1093) - Fix VS 2026 references → 'Visual Studio 2022 or later' in create-winrt-component-winui-cswinrt.md and net-projection-from-cppwinrt-component.md - Update 'We'll be using VS 2026 and .NET 6' → 'VS 2022 or later and .NET 8' in net-projection-from-cppwinrt-component.md - Fix authoring.md: 'with .NET 6' → 'with .NET 6 or later' in walkthrough link Co-authored-by: Copilot <[email protected]>
1 parent edd7915 commit 12cf8b5

4 files changed

Lines changed: 14 additions & 8 deletions

File tree

hub/apps/develop/platform/csharp-winrt/authoring.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ms.localizationpriority: medium
1313
1414
The C#/WinRT NuGet package provides support for authoring your own Windows Runtime types and components in C#, and consuming them from any Windows Runtime-compatible language such as [C++/WinRT](/windows/uwp/cpp-and-winrt-apis/) or [Rust](../../../../dev-environment/rust/rust-for-windows.md). C#/WinRT authoring and hosting support requires .NET 6 or later and Visual Studio 2022 or later, and it is intended to support desktop application scenarios including the [Windows App SDK](../../../windows-app-sdk/index.md), and [WinUI3](../../../winui/winui3/index.md).
1515

16-
For a walkthrough showing how to author a Windows Runtime component with .NET 6, and how to consume it from a C++/WinRT console application, see [Walkthrough: Create a C#/WinRT component and consume it from C++/WinRT](./create-windows-runtime-component-cswinrt.md).
16+
For a walkthrough showing how to author a Windows Runtime component with .NET 6 or later, and how to consume it from a C++/WinRT console application, see [Walkthrough: Create a C#/WinRT component and consume it from C++/WinRT](./create-windows-runtime-component-cswinrt.md).
1717

1818
For more details, and to search for or file any issues, refer to the [C#/WinRT GitHub repo](https://github.com/microsoft/CsWinRT) and [Authoring C#/WinRT Components](https://github.com/microsoft/CsWinRT/blob/master/docs/authoring.md).
1919

hub/apps/develop/platform/csharp-winrt/create-windows-runtime-component-cswinrt.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
---
22
title: Walkthrough—Create a C#/WinRT component, and consume it from C++/WinRT
33
description: Author a Windows Runtime component with C#/WinRT, and consume it from a native application.
4-
ms.date: 04/13/2026, and consume it from C++/WinRT
4+
ms.date: 04/13/2026
5+
ms.topic: article
6+
ms.localizationpriority: medium
7+
---
58

69
C#/WinRT enables developers using .NET to author their own Windows Runtime components in C# using a class library project. Authored components can be consumed in native desktop applications as a package reference or as a project reference with a few modifications.
710

hub/apps/develop/platform/csharp-winrt/create-winrt-component-winui-cswinrt.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
---
22
title: Walkthrough—Create a C# component with WinUI controls, and consume it from a C++/WinRT app that uses the Windows App SDK
33
description: Author a Windows Runtime component with C#/WinRT with WinUI controls, and consume it from any Windows App SDK app.
4-
ms.date: 04/13/2026, and consume it from a C++/WinRT app that uses the Windows App SDK
4+
ms.date: 04/13/2026
5+
ms.topic: article
6+
ms.localizationpriority: medium
7+
---
58

69
C#/WinRT provides support for authoring Windows Runtime components, including WinUI custom types and custom controls. These components can be consumed from either C# or C++/WinRT applications that use the Windows App SDK. We recommend using C#/WinRT v1.6.4 or later to author runtime components with NuGet packaging support.
710

@@ -13,7 +16,7 @@ This walkthrough demonstrates how to author a C# component with a custom WinUI c
1316

1417
This walkthrough requires the following tools and components:
1518

16-
- [Visual Studio 2026](/visualstudio/releases/2026/release-notes)
19+
- [Visual Studio 2022 or later](/visualstudio/releases/2022/release-notes)
1720
- [.NET 6.0 SDK](https://dotnet.microsoft.com/download/dotnet/6.0) or later
1821
- [Windows App SDK VSIX](../../../windows-app-sdk/downloads.md) (1.1 from the stable channel)
1922

@@ -173,7 +176,7 @@ Consumption from packaged apps that use a separate **Windows Application Packagi
173176
## Known issues
174177

175178
- Consuming a C# component as a project reference requires `PublishReadyToRun` to be set to `False`. See [GitHub Issue #1151](https://github.com/microsoft/CsWinRT/issues/1151) for more details.
176-
- Consuming a C# component built for `AnyCPU` from C++ is supported only from `x86` applications currently. `x64` and `Arm64` apps result in a runtime error similar to: *%1 is not a valid Win32 application.* See [GitHub Issue #1151](https://github.com/microsoft/CsWinRT/issues/1093) for more details.
179+
- Consuming a C# component built for `AnyCPU` from C++ is supported only from `x86` applications currently. `x64` and `Arm64` apps result in a runtime error similar to: *%1 is not a valid Win32 application.* See [GitHub Issue #1093](https://github.com/microsoft/CsWinRT/issues/1093) for more details.
177180

178181
## Related topics
179182

hub/apps/develop/platform/csharp-winrt/net-projection-from-cppwinrt-component.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ In .NET 6 and later, consumption of Windows metadata (WinMD) files is no longer
2121

2222
This walkthrough and the corresponding sample require the following tools and components:
2323

24-
* [Visual Studio 2026](https://visualstudio.microsoft.com/downloads/) with the Universal Windows Platform development workload installed. In **Installation Details** > **Universal Windows Platform development**, check the **C++ (v14x) Universal Windows Platform tools** option.
24+
* [Visual Studio 2022 or later](https://visualstudio.microsoft.com/downloads/) with the Universal Windows Platform development workload installed. In **Installation Details** > **Universal Windows Platform development**, check the **C++ (v14x) Universal Windows Platform tools** option.
2525
* [.NET 6.0 SDK](https://dotnet.microsoft.com/download/) or later.
2626

27-
We'll be using Visual Studio 2026 and .NET 6 in this walkthrough.
27+
We'll be using Visual Studio 2022 or later and .NET 8 in this walkthrough.
2828

2929
> [!IMPORTANT]
3030
> Also, you'll need to download or clone the sample code for this topic from the [C#/WinRT projection sample](https://github.com/microsoft/CsWinRT/tree/master/src/Samples/NetProjectionSample) on GitHub. Visit [CsWinRT](https://github.com/microsoft/CsWinRT), and click the green **Code** button to get the `git clone` url. Be sure to read the [README.md](https://github.com/microsoft/CsWinRT/blob/master/src/Samples/NetProjectionSample/README.md) file for the sample.
@@ -33,7 +33,7 @@ We'll be using Visual Studio 2026 and .NET 6 in this walkthrough.
3333

3434
To follow this walkthrough, you must first have a C++/WinRT Windows Runtime component (WRC) from which to generate the C# projection assembly.
3535

36-
This walkthrough uses the **SimpleMathComponent** WRC from the [C#/WinRT projection sample](https://github.com/microsoft/CsWinRT/tree/master/src/Samples/NetProjectionSample) on GitHub, which you already downloaded or cloned. **SimpleMathComponent** was created from the **Windows Runtime Component (C++/WinRT)** Visual Studio project template (which comes with Visual Studio 2026).
36+
This walkthrough uses the **SimpleMathComponent** WRC from the [C#/WinRT projection sample](https://github.com/microsoft/CsWinRT/tree/master/src/Samples/NetProjectionSample) on GitHub, which you already downloaded or cloned. **SimpleMathComponent** was created from the **Windows Runtime Component (C++/WinRT)** Visual Studio project template.
3737

3838
To open the **SimpleMathComponent** project in Visual Studio, open the `\CsWinRT\src\Samples\NetProjectionSample\CppWinRTComponentProjectionSample.sln` file, which you'll find in your download or clone of the repo.
3939

0 commit comments

Comments
 (0)