forked from dotnet/docs
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
81 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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)] | ||
|
||
*** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 54 additions & 0 deletions
54
includes/core-changes/interop/5.0/built-in-support-for-winrt-removed.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 <xref:System.IO.FileNotFoundException>. If you activate a WinRT class, you'll get a <xref:System.PlatformNotSupportedException>. | ||
|
||
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 | ||
|
||
- <xref:System.IO.WindowsRuntimeStorageExtensions?displayProperty=fullName> | ||
- <xref:System.IO.WindowsRuntimeStreamExtensions?displayProperty=fullName> | ||
- <xref:System.Runtime.InteropServices.WindowsRuntime?displayProperty=fullName> | ||
- <xref:System.WindowsRuntimeSystemExtensions?displayProperty=fullName> | ||
- <xref:Windows.Foundation.Point?displayProperty=fullName> | ||
- <xref:Windows.Foundation.Size?displayProperty=fullName> | ||
- <xref:Windows.UI.Color?displayProperty=fullName> | ||
|
||
<!-- | ||
#### Affected APIs | ||
- `T:System.IO.WindowsRuntimeStorageExtensions` | ||
- `T: System.IO.WindowsRuntimeStreamExtensions` | ||
- `N:System.Runtime.InteropServices.WindowsRuntime` | ||
- `T:System.WindowsRuntimeSystemExtensions` | ||
- `T:Windows.Foundation.Point` | ||
- `T:Windows.Foundation.Size` | ||
- `T:Windows.UI.Color` | ||
--> |