Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

How to create uwp app that lights up desktop code?


Asked by Julio Hendrix on Dec 14, 2021 FAQ



Here is a step-by-step guide to create your first UWP app that lights up powerful desktop code: Add extension and packaging projects In your UWP VS solution, add a “Windows Classic Desktop” project to implement your extension. This could be any type of Win32 or .NET project in any language. For “Hello World” I am adding a C# Console project.
Consequently,
Next you need to add a “Windows Application Packaging Project” (look for it in the “Windows Universal” category). So your solution setup looks like in the screenshot below. In order to package both the UWP and the desktop code in one app package, add both as Application references to the Packaging project:
One may also ask, From the File menu, select New > Project to open the New Project dialog. From the list of templates on the left, choose Installed > Visual C# > Windows Universal to see the list of UWP project templates. (If you don't see any Universal templates, you might be missing the components for creating UWP apps.
Moreover,
TL;RD; Including a desktop extension (‘windows.fullTrustProcess’) in your UWP app package lets your UWP app light up PC-specific capabilities when run on the Windows 10 desktop SKU (including Windows 10 S mode). The extension code runs at the full privileges of the user and has access to all public APIs on the machine.
Also Know,
If you have an existing desktop application that was built using the .NET Framework (including WPF and Windows Forms) or C++ Win32 APIs, you have several options for moving to the Universal Windows Platform (UWP) and Windows 10. You can package your desktop application in an MSIX package to get access to many more Windows 10 features.