Bug #71474 Installer does not instal Visual Studio Plugin if only VS2013 is installed
Submitted: 24 Jan 2014 20:35 Modified: 18 Feb 2014 4:43
Reporter: Fernando Gonzalez.Sanchez Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL for Windows: Installer Severity:S3 (Non-critical)
Version:5.6.15.0 OS:Any
Assigned to: CPU Architecture:Any

[24 Jan 2014 20:35] Fernando Gonzalez.Sanchez
Description:
When trying to install MySql for Visual Studio in a machine with only VS2013 installed (no other Visual Studio), it fails to meet prerrequisite checking and refuses to install.

This is a bug originally reported by a user in forums and reported by Roberto Garcia.

A workaround is available:

The workaround consists in inserting a fake registry for another Visual Studio like 2010, as in the follwoing steps:

1. Create a directory c:\tmp\vs2010
2. Run regedit and edit the registry hive of VS2010 as follows:
If windows is 32 bit edition

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\10.0\Setup\VS]
"EnvironmentDirectory"="C:\\tmp\\vs2010"

Or if Windows is 64 bit edition
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\10.0\Setup\VS]
"EnvironmentDirectory"="C:\\tmp\\vs2010"

3. Now you can rerun MySql Installer, it will meet prerrequisites and install MySql for Visual Studio.
4. At the end it will have created three folder at c:\tmp\vs2010: Extensions, PrivateAssemblies & PublicAssemblies.
5. The folder c:\tmp\vs2010 (and subfolders & files) can be safely deleted now, together with the fake registry key.
6. Now VS2013 can be opened and use all the features for MySql for Visual Studio.
(You can also rerun the installer an remove MySql for Visual Studio without errors).

The problem and the workaround have been successfully tested in Windows 8, x86 with VS2013 and MySql Web Installer 5.6.15.10.

Also the problem does not happen if any of VS2008, VS2010 or VS2012 is installed, since that meets prerrequisites and allows the MySql for Visual Studio subinstaller to install for all Visual Studio versions available (including VS2013).

How to repeat:
1. Download and run web installer.
2. Choose client tools (or custom and select MySql for Visual Studio 1.1.3).
3. Click next, here, it fails and the error occurs
 The message is "Visual Studio 2008, 2010, 2012", so the problem is not being checking for VS2013 registry key.

Suggested fix:
Expected result: should allow to proceed with the installation for of MySql for Visual Studio after prerrequisite checked successfully existence of VS2013 installation.

The following code in Wix, can check it

<!-- Visual Studio 2012 installation location -->
    <Property Id='VS_2012_PATH' Secure='yes'>
      <RegistrySearch Id='Find_VS2012_Path' Root='HKLM' Key='SOFTWARE\Microsoft\VisualStudio\12.0\Setup\VS'
          Name='EnvironmentDirectory' Type='raw'/>
    </Property> 

or any subhive of HKLM\SOFTWARE\Microsoft\VisualStudio\12.0\Setup\VS for that matter.
[25 Jan 2014 2:34] Fernando Gonzalez.Sanchez
The forum entry from where this originated was http://forums.mysql.com/read.php?174,604341,604523#msg-604523
[31 Jan 2014 21:04] De Hawkins
This may work for some users installing the MySQL software.  I had the same error.

Another option is to repair the MS Office 2010 files using the install disk. This rebuilt the Visual Studio runtime files which were necessary to continue the install. I selected the repair option and the issue was resolved. 

This is a great fix for those that do not want to edit their registry file.

DeHawkins
[18 Feb 2014 2:57] Edgardo Ramirez
Under the 10.0, directory I only have the VC folder and the Binding Paths, there is no VS folder. 

I currently have VS Ultimate 2013 in windows 8 computer.
[18 Feb 2014 4:43] Philip Olson
Fixed as of the upcoming MySQL Installer for Windows 1.3.6 release, and here's the changelog entry:

MySQL for Visual Studio would fail to install on a host that only had
Visual Studio 2013 installed, as the pre-requisite check only scanned for
version 2012 or below.

Thank you for the bug report.