桌面应用程序是否可以通过 Visual Studio 进行桌面桥接调用 UWP API? [英] Can desktop app desktop-bridged via Visual Studio call UWP APIs?
问题描述
我对调用
是的.APPX 和 MSIX 包之间没有重要区别,或者您是否使用桌面桥、Windows 应用程序打包项目
或手动使用 MakeAppx.exe
打包您的应用程序.
包文件扩展名是 .msix
(或 .msixbundle
,如果您要创建一个 bundle) 如果目标版本设置为 1809/October 2018 Update/Build 17763/RS5 或更高版本.否则它是 .appx
.
APPX 和 MSIX 软件包都已安装并且可以以完全相同的方式使用.
I'm a bit confused about calling Calling UWP APIs from a desktop app. The last sentence of the first paragraph of this link states:
a WPF, Windows Forms, or Win32 app cannot call UWP API unless the app is packaged in an MSIX package.
Using VS2019
I have desktop-bridged
my WPF app (developed in VS2019
). This process created a folder (under ...\AppPackages
folder) whose contents are shown below. Double clicking the .appxbundle
from this folder, I can successfully sideload the app on my Windows 10
(and it gives me the option to upload to upload/publish to Microsoft Store
as well):
Question: After satisfying some other requirement, can this app now call UWP APIs
? As noted from the above link, the app needs to be packaged in an MSIX package. And I don't see any MSIX
file in the image below:
Yes. There is no important difference between an APPX and an MSIX package, or whether you have packaged your application using the desktop bridge, a Windows Application Packaging project
or manually using MakeAppx.exe
.
The package file extension is .msix
(or .msixbundle
if you are creating a bundle) if the target version is set to 1809/October 2018 Update/Build 17763/RS5 or later. Otherwise it's .appx
.
Both APPX and MSIX packages are installed and can be used the exact same way.
这篇关于桌面应用程序是否可以通过 Visual Studio 进行桌面桥接调用 UWP API?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!