You can accomplish this by hacking a project file and copying some files. The following is an example of using the Visual C ++ 2012 Runtime libraries in Visual Studio 2013. You will need to change some version numbers if you use a different version of Visual Studio or want a different version of the Visual C ++ runtime libraries.
First add the following to the project file:
<ItemGroup> <BootstrapperPackage Include="Microsoft.Visual.C++.11.0.x64"> <Visible>False</Visible> <ProductName>Visual C++ 2012 Runtime Libraries %28x64%29</ProductName> <Install>true</Install> </BootstrapperPackage> </ItemGroup>
The example above is for the 64-bit version of the Runtime Visual C ++ 2012 libraries. If you want to use the 32-bit version, you must replace x64 with x86. And if you want to use a different version of the C ++ library, you will have to change the version number to 11.0. If you open your project at this stage and move on to the necessary requirements, you will notice a warning that Visual Studio 2013 cannot find the Visual C ++ Runtime libraries. To fix this, you will need to copy some files.
- Go to the following folder: C: \ Program Files (x86) \ Microsoft SDK \ Windows \ v8.0A \ Bootstrapper \ Packages. If you need a different version of the C ++ runtime libraries, you must change the version number of v8.0a.
- Copy the vcredist_x86 folder to the folder used by Visual Studio 2013: C: \ Program Files (x86) \ Microsoft SDK \ Windows \ v8.1A \ Bootstrapper \ Packages. Make sure you use a different name to avoid overwriting the 2013 libraries. I used vcredist_x64.2012.
At this point, you can open your decision and post your decision. When users install your application, they will also be asked to install the C ++ Runtime libraries. If your users have already installed the application that will need to be reinstalled, otherwise they will not have a question about installing C ++ runtime libraries.
You may not have the C: \ Program Files (x86) \ Microsoft SDK \ Windows \ v8.0A \ Bootstrapper \ Packages folder on your system. I think that you will only get this folder when installing Visual Studio 2012 other than Visual Studio 2013. Feel free to edit this question if you know where you can simply download files without installing Visual Studio 2012.
source share