Visual Studio 2017 Installer Project - include VC++ 2015 Redistributable

前端 未结 2 2055
情书的邮戳
情书的邮戳 2020-11-29 14:03

I am creating the installer for my application using a \"Visual Studio Installer\" project type in Visual Studio 2017.

I want my installer to install visual c++ redi

相关标签:
2条回答
  • 2020-11-29 14:36

    Recommendation: Migrate to WiX Burn (bootstrapper / downloader / sequencer) to allow more future flexibility and control (WiX links below).

    Alternatively try the prerequisites section below first (select the "Visual Studio 14" entries for install) or try the merge modules available (section below). Please pay attention to the disclaimers for the merge modules.

    • WiX Burn XML Markup Sample.
    • WiX Burn Information & Simple Markup Sample - with lots of links for further information.
    • WiX - Install Prerequisites and 3rd party applications

    Logging & Mutex: What does the log file say? From a technical point of view the usual problem is that you can not install another MSI package from within your own running MSI setup due to technical runtime restrictions. A mutex is set to prevent several MSI installation transactions to happen at once. Check the logs. This redistributable is MSI-based I believe - so you will see this problem when running the EXE from a custom action like you do.

    Deployment Tools: Visual Studio Installer Projects are very limited, and it seems most people migrate away from them to another deployment tool over time. Maybe have a look here - and here is a list of tools. WiX's Burn feature (bootstrapper / downloader / sequencer) can achieve what you need. Also read PhilDW's answer here.

    Prerequisites: Visual Studio Installer Projects do have a prerequisites view (click the Prerequisites... button) where a limited number of prerequisites can be defined for installation via the setup.exe bootstrapper (not kicked off from within your MSI itself, but from its bootstrapper setup.exe - this means you don't kick off the install from within your own MSI, but before it starts to install - and it can hence work correctly). I am not sure if the entries for "Visual Studio 14" are for the runtime version you need. You could give it a try I suppose.

    Merge Modules: There are merge modules to install the Visual Studio Runtime (see here, section "Visual C++ Runtime" - quite a bit down the page), but they seem inadequate these days for reasons explained here (very important). Essentially the Visual Studio Runtime is more complicated from 2015 onwards - and the EXE installer is preferred. Must read link - please. In order to locate relevant merge modules, please search for *.msm files underneath %ProgramFiles(x86)% - if you have Visual Studio (and / or the Windows SDK) installed. Merge modules can be installed embedded in your own package without the need for a setup.exe launcher. In Visual Studio, right click your installer project, Add, then Merge Module...

    0 讨论(0)
  • 2020-11-29 14:40

    You can't run that redistributable as a custom action because it's an MSI-based install, and you cannot run recursive MSI installs (yours calling the VC redist one).

    In Visual Studio setup projects you're supposed to use the Prerequisites feature. Right-click the setup project in Solution Explorer, choose Properties, then Prerequisites. This will build a setup.exe to install prerequisites followed by your MSI file. As far as I can tell, the Microsoft Visual C++ 14 is the Visual Studio 2015 runtimes.

    0 讨论(0)
提交回复
热议问题