Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where is the VC++ 2012 Runtime Bootstrapper package in Visual Studio 2013?

I have a .NET 4.5.2 application that's deployed via ClickOnce. It uses the Magick.NET library, which requires the Visual C++ Redistributable for Visual Studio 2012. I've tried it with the 2013 package, but it still needs the 2012 version to work. Unfortunately, the only version listed under the possible Prerequisites in Visual Studio 2013 is the 2013 version. Other version are nowhere to be found:

Visual Studio 2013 ClickOnce prerequisite window

How do I include the Visual C++ 2012 Runtime Libraries with my ClickOnce app in Visual Studio 2013?

EDIT: There appears to be a very similar question for another version of Visual Studio which got very little attention.

like image 724
Allon Guralnek Avatar asked Apr 06 '15 12:04

Allon Guralnek


People also ask

What is a bootstrapper installer package?

A bootstrapper package is a group of directories and files that contain manifest files that describe how the prerequisite should be installed. The bootstrapper first detects whether any of the prerequisites are already installed. If prerequisites are not installed, first the bootstrapper shows the license agreements.

Where is VC ++ runtime?

The Redistributable is available in the my.visualstudio.com Downloads section as Visual C++ Redistributable for Visual Studio 2019 - Version 16.7. Use the Search box to find this version. To download the files, select the platform and language you need, and then choose the Download button.

What is ClickOnce bootstrapper package for Microsoft .NET Framework?

The . NET Framework 4.6 ClickOnce Bootstrapper package updates the prerequisite components list in Visual Studio 2013 by installing the required files that enable Visual Studio 2013 to offer the . NET Framework 4.6 entry in the list of available prerequisites. When it is available, you can select the .


1 Answers

You can accomplish this by hacking your project file and copying some files. The example below is for using the Visual C++ 2012 Runtime libraries in Visual Studio 2013. You will have to change some version numbers if you are using a different version of Visual Studio or want a different version of the Visual C++ Runtime libraries.

First add the following to your 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 Visual C++ 2012 Runtime Libraries. If you want to use the 32-bit version you should replace x64 with x86. And if you want to use a different version of the C++ library you will have to change the 11.0 version number. If you open your project at this point and go to the prerequisites 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.

  1. Go to the following folder: C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\Bootstrapper\Packages. If you want a different version of the C++ Runtime Libraries you should change the v8.0a version number.
  2. Copy the folder vcredist_x86 to the folder that Visual Studio 2013 uses: C:\Program Files (x86)\Microsoft SDKs\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 solution and publish your solution. When users install your application they will be asked to also install the C++ Runtime libraries. If your users already installed the application they will need to reinstall otherwise they won't get the question to install the C++ Runtime libraries.

It might be possible that you don't have the C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\Bootstrapper\Packages folder on your system. I think you only get this folder when you install Visual Studio 2012 besides Visual Studio 2013. Feel free to edit this question if you know where you can just download the files without having to install Visual Studio 2012.

like image 90
dlemstra Avatar answered Nov 05 '22 16:11

dlemstra