ClickOnce with Visual C++ 2010 Runtime Libraries (x86) Prerequisite

This article applies to Visual Studio 2010 SP1.

ClickOnce provides a nice utility to include prerequisites in the deployment. But the VC++ Runtime x86 shipped with VS is bugged. As a result, the ClickOnce installer will try to download and install the VC++ Runtime all the time. And most of the times, this installation will fail because it finds that a newer version has already been installed.

There are in fact two things going wrong here:

1) The installer tries to detect the installed VC++ Runtime with a wrong product code. So when it cannot find the wrong code, it thinks the VC++ Runtime is not installed and tries to download one.

2) It uses a wrong download link to download the older version of the runtime, which would fail if you already has a newer one.


1) Go to C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bootstrapper\Packages\vcredist_x86\product.xml. Find this section:

 <MsiProductCheck Property="VCRedistInstalled" Product="{6EE91C1A-A2E7-38CD-AEBB-3B900A4D8868}"/>

The product code needs to be changed to {F0C3E5D1-1ADE-321E-8167-68EF0DE699A5}.

2) Go to C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bootstrapper\Packages\vcredist_x86\en\package.xml. Find this section:

<String Name="VCRedistExe">;clcid=0x409</String>

The LinkID needs to be changed to 210621.