Windows 10 UWP 桌面桥应用程序 (C++):调试版本中的 VCLibs 依赖项 [英] Windows 10 UWP Desktop Bridge Application (C++): VCLibs dependencies in a debug build

查看:29
本文介绍了Windows 10 UWP 桌面桥应用程序 (C++):调试版本中的 VCLibs 依赖项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个带有用 C++ 编写的桌面桥的 Windows 10 UWP 应用程序(用/ZW 编译).可执行文件依赖于 Visual C++ 运行时.

I am developing a Windows 10 UWP App with a desktop bridge writen in C++ (Compiled with /ZW). The executable has a dependency to the Visual C++ Runtime.

  • 当我添加依赖项

<PackageDependency Name="Microsoft.VCLibs.140.00.UWPDesktop" MinVersion="14.0.24123.0" Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=美国"/>

到发布版本中的应用程序清单,一切正常.我安装应用程序侧载.(MinVersion 是在构建过程中复制到Dependencies"输出文件夹中的 VCLibs 包的版本)

to the application's manifest in a release build all works fine. I install the application side-loaded. (MinVersion is the version of the VCLibs package copied into the "Dependencies" output folder during the build)

  • 当我添加依赖项

<PackageDependency Name="Microsoft.VCLibs.140.00.Debug.UWPDesktop" MinVersion="14.0.25022.0" Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington,C=US"/>

到调试版本中的应用程序清单(如此处所述:https://blogs.msdn.microsoft.com/vcblog/2016/07/07/using-visual-c-runtime-in-centennial-project/,请参阅用于调试"),我无法安装包并出现错误Windows 无法安装包...因为此包依赖于找不到的框架.提供框架Microsoft.VCLibs.140.00.Debug.UWPDesktop"由...发布.

to the application's manifest in a debug build (as documented here: https://blogs.msdn.microsoft.com/vcblog/2016/07/07/using-visual-c-runtime-in-centennial-project/, see "For Debugging"), I cannot install the package with the error "Windows cannot install package ... because this package depends on a framework that could not be found. Provide the framework "Microsoft.VCLibs.140.00.Debug.UWPDesktop" published by ...".

  • 当我完全跳过添加依赖项时,我可以安装该应用程序,但正如预期的那样,桌面桥接进程无法启动,并显示错误找不到 vccorlib140.DLL"(或 vccorlib140d.DLL,以防调试构建).但是,从构建输出Dependencies"文件夹手动安装 Microsoft.VCLibs.140.00.Debug 包不会改变任何内容.

  • When I skip adding the dependency at all I can install the application, but as expected the desktop bridge process fails to start with the error "vccorlib140.DLL was not found" (or vccorlib140d.DLL in case of a debug build). However, manually installing the Microsoft.VCLibs.140.00.Debug packages from the build output "Dependencies" folder does not change anything.

当我添加依赖项时(没有 UWPDesktop 后缀)

When I add the dependency (without the UWPDesktop suffix)

<PackageDependency Name="Microsoft.VCLibs.140.00.Debug" MinVersion="14.0.25022.0" Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=美国"/>

对于调试版本中的应用程序清单,我可以安装该应用程序,但它也无法启动,并显示找不到 vccorlib140d.DLL".

to the application's manifest in a debug build, I can install the application, but it also fails launching with "vccorlib140d.DLL was not found".

如何使调试版本正常工作?当然,我可以将 VCLibs-DLL 复制到系统的 System32 目录中,该目录可以工作,但如果调试版本也可以开箱即用",那就太好了.

How do I get the debug build working? Of course I can copy the VCLibs-DLLs into the system's System32 directory which works but it would be nice if a debug build also works "out of the box".

我使用的是 64 位 Windows 10 企业版 15063.540.

I am using a 64-Bit Windows 10 Enterprise version 15063.540.

问候,多米尼克

推荐答案

为了测试调试版本,您需要先手动安装调试 VCLIB appx 包.更多信息可以在这里找到:

In order to test the debug version you will need to install the debug VCLIB appx package manually first. More info can be found here:

https://docs.microsoft.com/en-us/troubleshoot/cpp/c-runtime-packages-desktop-bridge

这篇关于Windows 10 UWP 桌面桥应用程序 (C++):调试版本中的 VCLibs 依赖项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆