microsoft / msix-packaging

MSIX SDK
MIT License
963 stars 163 forks source link

Help in including Visual C++ redistributable in a .msix package #597

Closed sistla-gautam closed 4 months ago

sistla-gautam commented 10 months ago

I have an unreal engine application that needs certain Visual C++ redistributables to be installed by the user in order for the application to run.

I included some dependency in the section of the manifest file. But while installing, the package throws an error stating that the dependencies are not found. I have attached the manifest file's dependencies section below.

<Dependencies>
    <TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.16299.0" MaxVersionTested="10.0.22000.1" />
    <PackageDependency Name="Microsoft.VC80.CRT" MinVersion="8.0.50727.42" Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US" />
    <PackageDependency Name="Microsoft.VC90.CRT" MinVersion="9.0.21022.8" Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US" />
    <PackageDependency Name="Microsoft.VC100.CRT" MinVersion="10.0.40219.325" Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US" />
    <PackageDependency Name="Microsoft.VC110.CRT" MinVersion="11.0.60610.1" Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US" />
    <PackageDependency Name="Microsoft.VC120.CRT" MinVersion="12.0.21005.1" Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US" />
    <PackageDependency Name="Microsoft.VC142.CRT" MinVersion="14.29.30031.0" Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US" />
    <PackageDependency Name="Microsoft.NET.Native.Framework.3.5" Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US" MinVersion="3.5.29231.0" />
    <PackageDependency Name="Microsoft.VCLibs.110.00.UWPDesktop" MinVersion="11.0.61135.0" Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US" />
    <PackageDependency Name="Microsoft.VCLibs.120.00.UWPDesktop" MinVersion="12.0.40653.0" Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US" />
    <PackageDependency Name="Microsoft.VCLibs.140.00.UWPDesktop" MinVersion="14.0.24217.0" Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US" />
  </Dependencies>

Any help on the same issue will be greatly appreciated. Thank you

florelis commented 9 months ago

Most of these don't seem like MSIX packages you can list as dependencies in your manifest.

For a lot of the VC++ redistributable files, I think you can simply include them within your package. If you install multiple MSIX packages that contain the same redistributable files, the OS will ensure there is only one real copy so as to reduce the amount of space required.

I believe .NET 3.5 has to be manually enabled as a Windows Feature by users.

I think the only ones that you can actually list there are the VCLibs UWPDesktop ones. IIRC, these should be installed when you install your app, unless there is something else preventing it (like disabling the MS Store).