NETSDK1130 indicates that you're trying to reference a Windows Metadata component directly from an app that targets .NET 5 or later. The full error message is similar to the following example:
<Component name> cannot be referenced. Referencing a Windows Metadata component directly when targeting .NET 5 or higher is not supported.
To resolve this error:
Remove references to the Microsoft.Windows.SDK.Contracts package. Instead, specify the version of the Windows APIs that you want to access via the TargetFramework
property of the project. For example:
<TargetFramework>net5.0-windows10.0.19041.0</TargetFramework>
If you're consuming a third-party runtime component that's defined in a .winmd file, add a reference to the Microsoft.Windows.CsWinRT NuGet package. For information on how to generate the C# projection, see the C#/WinRT documentation.
For more information, see Built-in support for WinRT is removed from .NET and Call Windows Runtime APIs in desktop apps.
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide. Additional resources In this articleWas this page helpful?
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4