From 026920c0aecadd131acfbf8db7bb7aa9039a90b5 Mon Sep 17 00:00:00 2001 From: Genevieve Warren <24882762+gewarren@users.noreply.github.com> Date: Tue, 23 Jun 2020 16:14:47 -0700 Subject: [PATCH 1/2] fixes #18875 --- docs/core/compatibility/3.1-5.0.md | 8 +++ docs/core/compatibility/interop.md | 18 +++++++ includes/core-changes/categoryselector.md | 1 + .../5.0/built-in-support-for-winrt-removed.md | 54 +++++++++++++++++++ 4 files changed, 81 insertions(+) create mode 100644 docs/core/compatibility/interop.md create mode 100644 includes/core-changes/interop/5.0/built-in-support-for-winrt-removed.md diff --git a/docs/core/compatibility/3.1-5.0.md b/docs/core/compatibility/3.1-5.0.md index 147e815d64b29..b96aa6ded01bd 100644 --- a/docs/core/compatibility/3.1-5.0.md +++ b/docs/core/compatibility/3.1-5.0.md @@ -101,6 +101,14 @@ If you're migrating from version 3.1 of .NET Core, ASP.NET Core, or EF Core to v *** +## Interop + +- [Built-in support for WinRT is removed from .NET](#built-in-support-for-winrt-is-removed-from-net) + +[!INCLUDE [built-in-support-for-winrt-removed](~/includes/core-changes/interop/5.0/built-in-support-for-winrt-removed.md)] + +*** + ## Windows Forms - [Removed status bar controls](#removed-status-bar-controls) diff --git a/docs/core/compatibility/interop.md b/docs/core/compatibility/interop.md new file mode 100644 index 0000000000000..7cf4c613cda0f --- /dev/null +++ b/docs/core/compatibility/interop.md @@ -0,0 +1,18 @@ +--- +title: Interop breaking changes +description: Lists the breaking changes in interop in .NET Core and .NET 5.0 and later. +ms.date: 06/23/2020 +--- +# Interop breaking changes + +The following breaking changes are documented on this page: + +| Breaking change | Version introduced | +| - | :-: | +| [Built-in support for WinRT is removed from .NET](#built-in-support-for-winrt-is-removed-from-net) | 5.0 | + +## .NET 5.0 + +[!INCLUDE [built-in-support-for-winrt-removed](~/includes/core-changes/interop/5.0/built-in-support-for-winrt-removed.md)] + +*** diff --git a/includes/core-changes/categoryselector.md b/includes/core-changes/categoryselector.md index c62eb623466d0..199f12a1c060b 100644 --- a/includes/core-changes/categoryselector.md +++ b/includes/core-changes/categoryselector.md @@ -5,6 +5,7 @@ > - [Cryptography](~/docs/core/compatibility/cryptography.md) > - [EF Core](/ef/core/what-is-new/ef-core-3.0/breaking-changes) > - [Globalization](~/docs/core/compatibility/globalization.md) +> - [Interop](~/docs/core/compatibility/interop.md) > - [Networking](~/docs/core/compatibility/networking.md) > - [Visual Basic](~/docs/core/compatibility/visualbasic.md) > - [Windows Forms](~/docs/core/compatibility/winforms.md) diff --git a/includes/core-changes/interop/5.0/built-in-support-for-winrt-removed.md b/includes/core-changes/interop/5.0/built-in-support-for-winrt-removed.md new file mode 100644 index 0000000000000..ffd2b0b009f6d --- /dev/null +++ b/includes/core-changes/interop/5.0/built-in-support-for-winrt-removed.md @@ -0,0 +1,54 @@ +### Built-in support for WinRT is removed from .NET + +Built-in support for consumption of [Windows runtime (WinRT)](/uwp/winrt-cref/winrt-type-system) APIs in .NET is removed. + +#### Version introduced + +5.0 Preview 6 + +#### Change description + +Previously, CoreCLR could consume [Windows metadata (WinMD) files](/uwp/winrt-cref/winmd-files) to active and consume WinRT types. Starting in .NET 5.0, CoreCLR can no longer consume WinMD files directly. + +If you attempt to reference an unsupported assembly, you'll get a . If you activate a WinRT class, you'll get a . + +This breaking change was made for the following reasons: + +- So WinRT can be developed and improved separately from the .NET runtime. +- For symmetry with interop systems provided for other operating systems, such as iOS and Android. +- To take advantage of other .NET features, such as C# features, intermediate language (IL) linking, and ahead-of-time (AOT) compilation. +- To simplify the .NET runtime codebase. + +#### Recommended action + +- Remove references to the [Microsoft.Windows.SDK.Contracts package](https://www.nuget.org/packages/Microsoft.Windows.SDK.Contracts) and replace them with references to the [Microsoft.Windows.SDK.NET package](https://www.nuget.org/packages/microsoft.windows.sdk.net). + +- Use the [C#/WinRT](/windows/uwp/csharp-winrt/) tool chain to generate or customize WinRT APIs and types in .NET 5.0 and later versions. + +#### Category + +Interop + +#### Affected APIs + +- +- +- +- +- +- +- + + From 127ae9d2eb8b3a72b6568f8f682e8c8e19e2d63a Mon Sep 17 00:00:00 2001 From: Genevieve Warren <24882762+gewarren@users.noreply.github.com> Date: Tue, 23 Jun 2020 16:27:29 -0700 Subject: [PATCH 2/2] add interop to toc --- docs/core/compatibility/toc.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/core/compatibility/toc.yml b/docs/core/compatibility/toc.yml index 58fd69d3bb076..29f33b5057746 100644 --- a/docs/core/compatibility/toc.yml +++ b/docs/core/compatibility/toc.yml @@ -38,6 +38,8 @@ href: /ef/core/what-is-new/ef-core-3.0/breaking-changes?toc=/dotnet/core/compatibility/toc.json&bc=/dotnet/breadcrumb/toc.json - name: Globalization href: globalization.md + - name: Interop + href: interop.md - name: MSBuild href: msbuild.md - name: Networking