使用UWP扩展打开Consult应用程序(.NET框架)时会出现(Error DEP0700: Registration of the app failed. [0x80073CF6] AppxManifest.xml(33,10): Error 0x80080204: Registration failed: b0b2f355-4232-447c- 890a-feec3ec7ad4c_1.0.0.0_x86__hbnhee7zt39k0 包,因为找不到 EntryPoint 或 StartPage )
在 Visual Studio 2019 中。
在 Windows10 中。
使用 FullTrustProcessLauncher 启动其他应用程序
protected async override void OnNavigatedTo(NavigationEventArgs e)
{
base.OnNavigatedTo(e);
if (ApiInformation.IsApiContractPresent("Windows.ApplicationModel.FullTrustAppContract", 1, 0))
{
await FullTrustProcessLauncher.LaunchFullTrustProcessForCurrentAppAsync();
}
}
Cousule 应用程序从这里开始
namespace CollectDataAP
{
class Program
{
static private AppServiceConnection connection = null;
static void Main(string[] args)
{
Console.ReadLine();
InitializeWMIHandler();
InitGlobalVariable();
string tempForUWP = "", tempForOutput = "";
用于 Windows 应用程序包项目中的侧面加载
<Extensions>
<uap:Extension Category="windows.appService">
<uap:AppService Name="SampleInteropService" />
</uap:Extension>
<desktop:Extension Category="windows.fullTrustProcess" Executable="CollectDataAP\CollectDataAP.exe" />
</Extensions>
文件结构
当我重做此 UWP 项目时,仅侧面加载控制台应用程序。可以正常运行。 能给我一些指导吗?
点个赞吧
在 Package.appxmanifest 中
<Extensions>
<uap:Extension Category="windows.appService">
<uap:AppService Name="SampleInteropService" />
</uap:Extension>
<desktop:Extension Category="windows.fullTrustProcess" Executable="CollectDataAP\CollectDataAP.exe" />
</Extensions>
点赞
await FullTrustProcessLauncher.LaunchFullTrustProcessForCurrentAppAsync();
和编译器,只显示UWP。
恢复到原来的项目可以解决这个问题。