Describe the bug
A clear and concise description of what the bug is.
Targeting a windows-specific TFM in .NET 5, results in type conflicts between the UWP APIs in Microsoft.Windows.SDk.Contracts and the .NET SDK.
The following errors are observed in Visual Studio:
Error NETSDK1130 Referencing a Windows Metadata component directly when targeting .NETCoreApp,Version=v5.0 is not supported. Use the C#/WinRT projection tool (https://aka.ms/cswinrt) or a provided projection for this target
Error CS0433 The type 'XmlDocument' exists in both 'Microsoft.Windows.SDK.NET, Version=10.0.17763.10, Culture=neutral, PublicKeyToken=31bf3856ad364e35' and 'Windows.Foundation.UniversalApiContract, Version=7.0.0.0, Culture=neutral, PublicKeyToken=null, ContentType=WindowsRuntime'
Steps to Reproduce
- Create a .NET class library project
- Change the target framework moniker to
net5.0-windows10.0.17763.0
- Add a reference to
Microsoft.Toolkit.Uwp.Notifications.
- Reference any of the following types:
Windows.UI.Notifications.TileNotification, Windows.Data.Xml.Dom.XmlDocument.
Example:
- Build project
Expected behavior
A successful build with no type conflicts or compiler errors.
Screenshots
If applicable, add screenshots to help explain your problem.


Environment
Any windows-specific TFM.
NuGet Package(s): Microsoft.Toolkit.Uwp.Notifications
Package Version(s): 7.0.0-preview4, 6.1.1
Runtime: 5.0.100
OS build: 10.0.19041
App min and target version:
Describe the bug
A clear and concise description of what the bug is.
Targeting a windows-specific TFM in .NET 5, results in type conflicts between the UWP APIs in Microsoft.Windows.SDk.Contracts and the .NET SDK.
The following errors are observed in Visual Studio:
Steps to Reproduce
net5.0-windows10.0.17763.0Microsoft.Toolkit.Uwp.Notifications.Windows.UI.Notifications.TileNotification,Windows.Data.Xml.Dom.XmlDocument.Example:
Expected behavior
A successful build with no type conflicts or compiler errors.
Screenshots
If applicable, add screenshots to help explain your problem.


Environment
Any windows-specific TFM.
NuGet Package(s):
Microsoft.Toolkit.Uwp.NotificationsPackage Version(s):
7.0.0-preview4,6.1.1Runtime:
5.0.100OS build:
10.0.19041App min and target version: