相关文章推荐
完美的馒头  ·  Android开发 ...·  1 年前    · 
紧张的豌豆  ·  C 头文件 | 菜鸟教程·  1 年前    · 
Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

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.

  • When I add the dependency
  • <PackageDependency Name="Microsoft.VCLibs.140.00.UWPDesktop" MinVersion="14.0.24123.0" Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US" />

    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)

  • When I add the dependency
  • <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" />

    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 ...".

  • 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.

  • 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=US" />

    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".

    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".

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

    Regards, Dominik

    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://learn.microsoft.com/en-us/troubleshoot/cpp/c-runtime-packages-desktop-bridge

    Thank you for your answere! This worked. The build output only copies the "Microsoft.VCLibs.x64.Debug.14.00" package, but not the "Microsoft.VCLibs.x64.14.00.Desktop" package, which seem to be different. When installing the second one, it works. dominik Sep 11, 2017 at 8:05 I got a little confused with the differend suffixes "UWPDesktop", "Desktop", "Debug" ... Do you know why when building the procject with MSBuild the desktop VCLibs are not copied into the dependencies output folder although stated in the manifest? dominik Sep 11, 2017 at 8:24 Neither one is actually packaged with the appx. The way dependent framework packages work is that they come from the Store to avoid having each app package the same thing. However, the debug VCLib packages are not in the Store, so for testing in debug via sideloading you have to install them manually. Stefan Wick MSFT Sep 11, 2017 at 13:40 There doesn't appear to be ARM64 debug packages available, do you know where I can download those? jarjar Dec 21, 2018 at 7:37

    Thanks for contributing an answer to Stack Overflow!

    • Please be sure to answer the question . Provide details and share your research!

    But avoid

    • Asking for help, clarification, or responding to other answers.
    • Making statements based on opinion; back them up with references or personal experience.

    To learn more, see our tips on writing great answers .