Supported five-DLL VCLibs deployment contract for a PyInstaller/PySide6 desktop MSIX

Prosanta Roy 0 Reputation points
2026-10-31T15:58:41.1733333+00:00

Hello,

What is Microsoft's supported deployment contract for these five runtime DLLs in an x64, full-trust desktop MSIX containing two PyInstaller executables?

  • msvcp140.dll

msvcp140_1.dll

msvcp140_2.dll

vcruntime140.dll

vcruntime140_1.dll

Our proposed build inputs are CPython 3.12.10 AMD64, PyInstaller 6.22.2 and PySide6/Shiboken6 6.10.2. Main uses the windowed runw.exe bootloader; Helper uses console run.exe. Both have Python runtime hooks registering bundle, _internal/PySide6 and _internal/shiboken6 directories. Private MSVC runtime candidates exist, but final collection and provider selection are not established.

The framework under consideration is Microsoft.VCLibs.140.00.UWPDesktop, publisher CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US, family Microsoft.VCLibs.140.00.UWPDesktop_8wekyb3d8bbwe. Our preserved comparison package is 14.0.33321.0 x64; this PC currently has 14.0.33728.0 x64 and x86 registered. The application manifest currently has no VCLibs PackageDependency and declares Windows.Desktop minimum 10.0.19045.0.

Please clarify:

Dependency and minimum version: Is the UWPDesktop identity/publisher above the appropriate framework dependency for both executables? How should we determine its supported MinVersion from the compiler/toolset requirements of Python, Qt, bootloaders and native extensions? What authoritative mapping relates framework package versions to their contained runtime DLL versions and supported toolsets?

Framework versus private copies: For all five DLLs, what supported rules govern retaining, excluding or coexisting with privately collected copies? Does Desktop Bridge require framework-provided versions throughout this application, or are specific app-local configurations supported? We are not proposing removal or retention until that policy and early-startup requirements are established.

Both startup paths: Do the same rules cover Main and a separately launched Helper, including native dependency loading before Python hooks execute? What package-identity, helper-launch and package-graph conditions must hold?

Verification: Which supported Microsoft diagnostics should establish the actual loaded provider path, file identity/version and framework package identity for each executable, including early startup and transitive loads? How should we detect unintended private/system fallback and distinguish package-graph membership from actual loader binding?

We distinguish framework package version, individual DLL file version, compiler/toolset version and Windows minimum version. We do not assume that matching version suffixes, exports, signatures or DLL-directory registration order establishes compatibility.

Historical import matches concern binaries associated with an older 789-file source revision. They do not qualify our current frozen 791-file revision, whose executable artifacts are not yet authenticated. Actual packaged loader binding remains unverified.

We have consulted Microsoft's Desktop Bridge C++ runtime guidance, supported runtime guidance and DLL search-order documentation. Please identify the applicable supported configuration and any additional authoritative references.

Qt ICU deployment closure and target-Windows API-set/export/forwarder closure remain separate unresolved issues; a VCLibs answer will not be treated as resolving them.

Thank you.Hello,

What is Microsoft's supported deployment contract for these five runtime DLLs in an x64, full-trust desktop MSIX containing two PyInstaller executables?

msvcp140.dll

msvcp140_1.dll

msvcp140_2.dll

vcruntime140.dll

vcruntime140_1.dll

Our proposed build inputs are CPython 3.12.10 AMD64, PyInstaller 6.22.2 and PySide6/Shiboken6 6.10.2. Main uses the windowed runw.exe bootloader; Helper uses console run.exe. Both have Python runtime hooks registering bundle, _internal/PySide6 and _internal/shiboken6 directories. Private MSVC runtime candidates exist, but final collection and provider selection are not established.

The framework under consideration is Microsoft.VCLibs.140.00.UWPDesktop, publisher CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US, family Microsoft.VCLibs.140.00.UWPDesktop_8wekyb3d8bbwe. Our preserved comparison package is 14.0.33321.0 x64; this PC currently has 14.0.33728.0 x64 and x86 registered. The application manifest currently has no VCLibs PackageDependency and declares Windows.Desktop minimum 10.0.19045.0.

Please clarify:

Dependency and minimum version: Is the UWPDesktop identity/publisher above the appropriate framework dependency for both executables? How should we determine its supported MinVersion from the compiler/toolset requirements of Python, Qt, bootloaders and native extensions? What authoritative mapping relates framework package versions to their contained runtime DLL versions and supported toolsets?

Framework versus private copies: For all five DLLs, what supported rules govern retaining, excluding or coexisting with privately collected copies? Does Desktop Bridge require framework-provided versions throughout this application, or are specific app-local configurations supported? We are not proposing removal or retention until that policy and early-startup requirements are established.

Both startup paths: Do the same rules cover Main and a separately launched Helper, including native dependency loading before Python hooks execute? What package-identity, helper-launch and package-graph conditions must hold?

Verification: Which supported Microsoft diagnostics should establish the actual loaded provider path, file identity/version and framework package identity for each executable, including early startup and transitive loads? How should we detect unintended private/system fallback and distinguish package-graph membership from actual loader binding?

We distinguish framework package version, individual DLL file version, compiler/toolset version and Windows minimum version. We do not assume that matching version suffixes, exports, signatures or DLL-directory registration order establishes compatibility.

Historical import matches concern binaries associated with an older 789-file source revision. They do not qualify our current frozen 791-file revision, whose executable artifacts are not yet authenticated. Actual packaged loader binding remains unverified.

We have consulted Microsoft's Desktop Bridge C++ runtime guidance, supported runtime guidance and DLL search-order documentation. Please identify the applicable supported configuration and any additional authoritative references.

Qt ICU deployment closure and target-Windows API-set/export/forwarder closure remain separate unresolved issues; a VCLibs answer will not be treated as resolving them.

Thank you.

Windows development | Windows API - Win32

2 answers

Sort by: Most helpful
  1. Harry Nguyen (WICLOUD CORPORATION) 525 Reputation points Microsoft External Staff Moderator
    2026-11-02T03:21:55.2866667+00:00

    Hi @Prosanta Roy ,

    Sorry for the delayed response, and thank you for taking the time to provide such a detailed follow-up. I've reviewed the additional questions you raised.

    For the original Win32/Desktop Bridge question, Microsoft documents Microsoft.VCLibs.140.00.UWPDesktop as the v14 Desktop C++ Runtime framework dependency, rather than relying on runtime DLLs copied from Visual Studio or the Visual C++ Redistributable. The VCLibs Desktop Extension SDK is installed under:

    %ProgramFiles(x86)%\Microsoft SDKs\Windows Kits\10\ExtensionSDKs\Microsoft.VCLibs.Desktop\14.0 
    

    You can find more details in the C++ Runtime framework packages for Desktop Bridge documentation.

    Regarding Microsoft.VisualStudio.ComponentGroup.UWP.VC.BuildTools, it is documented as C++ Universal Windows Platform tools (Latest MSVC). However, the Build Tools component documentation does not explicitly establish that this component owns the specific SDKManifest.xml file you mentioned, so I wouldn't want to give you an unsupported Yes/No answer here.

    I think the remaining questions around the exact Visual Studio Installer component/package that owns SDKManifest.xml, standalone acquisition without the Visual Studio IDE, and installer/catalog provenance would fit better in a separate Visual Studio setup discussion.

    You can create a new question about Visual Studio Installer/Build Tools component ownership and SDKManifest.xml provenance on Microsoft Q&A, and my team can help you further there.

    If you found this helpful, you can refer to this guidance to confirm it and help others with similar questions.

    Thank you.

    Was this answer helpful?

    1 person found this answer helpful.

  2. AI answer

    2026-10-31T15:59:48.1333333+00:00

    Declare Microsoft.VCLibs.140.00.UWPDesktop as a required x64 framework dependency, source its exact MinVersion from the selected VCLibs Extension SDK’s SDKManifest.xml, and exclude the five private runtime DLLs from the final PyInstaller payload unless Microsoft confirms a separate app-local deployment design for this packaged scenario.

    Supported package configuration

    For a Desktop Bridge application dependent on the dynamic VC++ runtime, Microsoft’s documented contract is to reference the corresponding Desktop C++ Runtime framework package rather than merely redistribute the Visual Studio/VCRedist DLLs. The documented v14 identity and publisher match those in the question.^1^

    Add this under the existing manifest <Dependencies> element:

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

    MinVersion is the minimum framework package version, not the Windows minimum version, DLL file version, or compiler version. At deployment, Windows requires a dependency package whose version is equal to or greater than that value.^2^

    Determine the value as follows:

    1. Establish the MSVC toolset used to build every native input in the frozen 791-file revision:
      • CPython and its native modules;
      • PyInstaller run.exe and runw.exe;
      • Qt/PySide6 and Shiboken6 binaries;
      • every additional .pyd and native DLL.
    2. Install/select the matching supported VCLibs Desktop Extension SDK.
    3. Open its SDKManifest.xml.
    4. Copy the Name, Publisher, and MinVersion from FrameworkIdentity-Retail into AppxManifest.xml. This is Microsoft’s documented procedure; the example values such as 14.0.24217.0 or 14.0.27323.0 are examples, not a basis for selecting the current package’s minimum.^3^
    5. Build and test against that minimum and newer compatible framework versions.

    The general VC runtime rule is that the deployed v14 runtime must be the same version as or newer than the newest MSVC toolset used to build any loaded component. Visual Studio 2015–2026 use the compatible v14 family, but an older runtime is unsupported for a component built with a newer toolset.^4^

    The cited documentation does not provide a universal table mapping every Microsoft.VCLibs.140.00.UWPDesktop package version to each contained DLL file version and every supported MSVC toolset. Therefore, neither 14.0.33321.0 nor the installed 14.0.33728.0 can be selected solely from its numeric similarity to a toolset or DLL. Inspect the actual Extension SDK package and SDKManifest.xml; obtain build-toolset provenance from each binary supplier where it is not recorded.

    Framework versus private DLLs

    For this Desktop Bridge configuration, remove these private candidates from the final package after confirming the framework contains the complete imported set:

    • msvcp140.dll
    • msvcp140_1.dll
    • msvcp140_2.dll
    • vcruntime140.dll
    • vcruntime140_1.dll

    Do not intentionally mix private and framework copies under the assumption that the framework will win. For packaged desktop processes, name-based lookup checks the process package graph before the executable directory, but loaded-module reuse, Known DLLs, explicit paths, SxS redirection, and altered search modes can change the observed binding.^5^

    Microsoft’s general redistribution guidance permits local deployment in ordinary VC++ deployment scenarios, while discouraging it because the application becomes responsible for servicing.^4^ However, the more specific Desktop Bridge guidance says applications in that container must specify the Desktop framework and must not simply use Visual Studio/VCRedist runtime copies.^1^ That case-specific rule should govern this MSIX.

    Main and Helper processes

    The manifest dependency is package-level, not executable-specific. A packaged process receives a graph containing its main package and manifest-declared framework dependencies at process creation.^6^ This makes the runtime available before Python starts, so runtime hooks and AddDllDirectory calls are neither required nor early enough to establish the bootloader’s statically imported VC runtime.

    Apply the same validation independently to Main and Helper:

    1. Launch each through its intended production path.
    2. Confirm that each process has package identity. In Task Manager, enable Details → Select columns → Package name, or call GetCurrentPackageFullName; ERROR_INSUFFICIENT_BUFFER indicates identity and APPMODEL_ERROR_NO_PACKAGE indicates none.^7^
    3. Query each process’s graph with GetCurrentPackageInfo, requesting the applicable static framework entries, and verify the resolved x64 Microsoft.VCLibs.140.00.UWPDesktop full name/version.^8^
    4. If Helper reports no package identity or its graph lacks VCLibs, its actual launch arrangement has not produced the required packaged runtime context. A successful historical direct launch does not establish that contract.

    The available documentation does not state that every arbitrary helper-launch mechanism necessarily preserves the parent’s identity or graph. Validate the exact packaged activation/launch route rather than inferring inheritance from the parent process.

    Binding verification

    Use separate evidence for graph membership and loader binding:

    1. Graph: GetCurrentPackageInfo establishes which packages are available to that process; it does not prove which DLL won lookup.
    2. Loaded provider: Run listdlls -v <PID> for each process. ListDLLs reports loaded DLL paths and full version information; use -u as an additional unsigned-module check.^9^
    3. Live/short-lived loads: Capture Process Monitor events filtered to Main/Helper process names and the five DLL names. Process Monitor records process, file-system, and DLL activity in real time.^10^
    4. Earliest loader decisions: Before launching either executable, enable per-image loader snaps:
    gflags /i Main.exe +sls
    gflags /i Helper.exe +sls
    

    Attach/capture with the Windows debugger. Loader snaps record DLL loading and unloading for each configured image, including failures occurring before Python initialization.^11^

    After testing, remove the diagnostic setting:

    gflags /i Main.exe -sls
    gflags /i Helper.exe -sls
    

    For every one of the five names, record: importing module, attempted paths, selected full path, file version/signature, process package identity, and resolved framework package full name. A path under the resolved VCLibs framework package demonstrates framework binding; an application-directory or _internal path demonstrates private binding; a System32 path demonstrates system fallback. Repeat on a clean x64 VM with only the declared dependency installed, rather than relying on the development machine’s existing x86/x64 registrations.


    References

    1. C++ Runtime framework packages for Desktop Bridge
    2. PackageDependency
    3. Prepare to package a desktop application
    4. Determine which DLLs to redistribute
    5. Dynamic-link library search order
    6. MSIX framework packages and dynamic dependencies
    7. Detect package identity and runtime context
    8. GetCurrentPackageInfo function (appmodel.h)
    9. ListDLLs v3.21
    10. Sysinternals Process Utilities
    11. Show loader snaps
    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.