What is difference between Microsoft.Windows.SDK.NET and Sytem.Runtime.WindowsRuntime

Ran Bi 21 Reputation points Microsoft Employee
2022-02-15T10:05:20.193+00:00

Recently I am trying to migrate some UWP libraries to WinUI3. But I found a lot of class conflicts between these two packages. Concretely, some existing netstandard2.0 projects has dependencies on Sytem.Runtime.WindowsRuntime. With this library, some WinRT API could be called in the library. When I tried to add a reference to these projects from a WinUi library, there were so many conflicts on classes like:

Windows.UI.Color
Windows.Foundation.Points

How to resolve these conflicts?

Universal Windows Platform (UWP)
Windows App SDK
Windows App SDK
A set of Microsoft open-source libraries, frameworks, components, and tools to be used in apps to access Windows platform functionality on many versions of Windows. Previously known as Project Reunion.
750 questions
.NET Runtime
.NET Runtime
.NET: Microsoft Technologies based on the .NET software framework.Runtime: An environment required to run apps that aren't compiled to machine language.
1,141 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Bruce (SqlWork.com) 61,416 Reputation points
    2022-02-15T20:31:10.133+00:00

  2. Roy Li - MSFT 32,731 Reputation points Microsoft Vendor
    2022-02-17T05:43:27.097+00:00

    Hello,

    Welcome to Microsoft Q&A!

    If you want to migrate your UWP libraries to winui3, you will need to map some of the UWP APIs to their Windows App SDK equivalents. There is an API list about this and you could take a look at this document: Mapping UWP APIs and libraries to the Windows App SDK.

    Thank you.


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments