问题
I build app using VS2013 but it needs VC redistributable installed on target machine to open app. How can I install these along side my app?
回答1:
For Win32 desktop applications built with Visual Studio 2013, you can choose one of three options as covered on MSDN:
- Have your installer invoke the VCRedist_x86.exe for 32-bit apps, VCRedist_x64.exe for 64-bit native apps, or both if needed.
- If you use an MSI-based installer, use the MSM merge modules provided with Visual Studio 2013
- You can just copy the needed RETAIL (i.e. non-DEBUG) DLLs into your application folder as part of your installer (i.e. application local).
The first two options are better in the sense that security servicing is handled for the central OS-wide version. The last option doesn't require MSI or admin rights, but means deploying any security servicing updates for the C Runtime is your problem.
For Windows Store apps, Windows phone apps, and Xbox One apps you do not deploy the CRT yourself. It's part of the platform deployment service to do this.
来源:https://stackoverflow.com/questions/24745438/how-to-install-vs2013-redistributable-along-with-your-app