且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

“访问被拒绝"在 UWP (C#) 中尝试运行桌面扩展应用程序时

更新时间:2023-10-14 11:33:40

此错误表示您试图直接从 VS 启动 UWP 项目,但该项目没有声明所需的功能.相反,您需要将 Package 项目设置为您的启动项目.此项目将您的 UWP 和 Win32 可执行文件打包为一个单元,并设置执行所需的功能.

This error indicates that you were attempting to launch the UWP project from VS directly, which doesn't have the required capability declared. Instead you will need to set the Package project as your startup project. This project wraps both your UWP and your Win32 executables as one unit and sets up the required capabilities for execution.