I have built an application in Visual Studio 2005 that depends on the VC 8.0 runtime files being installed on the system. I have recently installed VS 2005 SP1 on my development system, and when I rebuild my application, it appears that it now depends on the SP1 versions of the VC 8.0 runtime files.
Is there a way I can build my application so that it will not depend on the SP1 versions of the VC 8.0 runtime files? If not, do I have to distribute the SP1 version of the VC 8.0 runtime files with my application in this scenario, and how can I detect when I need to install the VC 8.0 runtime redistributable package on my users’ systems?
Applications built using Visual Studio 2005 SP1 that depend on the VC runtime files will require the SP1 versions of those files in order to run correctly. You can avoid this dependency if necessary by maintaining a build machine that has Visual Studio 2005 without SP1 installed.
If you decide to build your application using Visual Studio 2005 SP1 and it depends on the VC runtime files, you will need to include the SP1 version of the VC runtime files in your setup package. I described some options for how to deliver the VC runtime files in this blog post. To summarize, you can do one of the following:
- Install the VC runtime redistribute package
- Include the VC runtime MSM in your MSI package
- Statically link to the VC runtime files at build time
- Install the VC runtimes to a local folder
If you choose to carry the VC runtime redistributable packages, you can use the detection logic described in this blog post to determine if the SP1 version of these packages are already installed on the user’s system.
Note: I also want to point out a couple of blogs that I recently found that are good resources for Visual C++ issues. I encourage you to check them out if you have additional questions about the VC runtime files: