VS2010 Setup Project with C++ 2008 Redistributables?

删除回忆录丶 提交于 2020-01-06 07:43:28

问题


Here is the situation:

  • I have a Visual Studio 2010 Setup project which installs a C# executable
  • The installation includes a C# dll that references a C++ dll
  • The C++ dll requires the C++ 2008 libraries

The problem is that it is very easy to make the setup project install the C++ 2010 libraries, but I am not having much luck trying to install 2008.

  • For 2010, it is as simple as selecting C++ 2010 in the Properties > Prerequisites section of the project. 2008 is not an option.
  • I have found much documentation about using merge modules to install C++ redistributables. However, in the C:\Program Files (x86)\Common Files\Merge Modules directory of my machine, I only have C++ 2010 merge modules. I have not been able to find the C++ 2008 merge modules available for download from any reputable source.
  • I can download the redistributable installer easily enough, but I do not know how to make the setup project use it.
  • I found this MSDN article on creating bootstrapper packages. Hopwever, the Bootstrapper Manifest Generator only seems to work for VS2008 and VS2005 (see comments).

I do not have the authority/ability to do any of the following, which I believe could resolve the issue:

  • Install VS2008 to get the correct merge modules
  • Use a different installer program, like InstallShield.
  • Re-compile the C++ dll to use the 2010 libraries.

If anyone has encountered and resolved this issue before, I welcome your help.


回答1:


The merge modules come along with VS2008 and a VS2008 license. Whoever created the C++ dll which depends on the 2008 runtimes probably has a license for VS2008. You can ask them to provide it to you - it's legal to do so.




回答2:


In order to add C++ 2008 redistributables as prerequisites in VS 2010, I found the following steps to be effective:

  1. Determine the product key for the redistributable. There is a good list here: http://blogs.msdn.com/b/astebner/archive/2009/01/29/9384143.aspx
  2. Add the installation executable and corresponding xml files to the bootstrapper directory (C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bootstrapper\Packages), as explained here: http://insomniacgeek.com/clickonce-4-0-package-for-the-c-2008-sp1-redist-atl-security-update/
  3. Restart VS, and check the prerequisites list for the setup project. All should now be present.

Also, as an aside, I discovered that unless you take the steps outlined in this question: Visual C++ 2010 Runtime Libraries prerequisite keeps popping up on a VS 2010 created installer your C++ 2010 redistributables will always try to install, even if they are already present.



来源:https://stackoverflow.com/questions/15619728/vs2010-setup-project-with-c-2008-redistributables

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!