MySQL Blog Archive
For the latest blogs go to blogs.oracle.com/mysql
MySQL for Visual Studio - Rollback during installation/uninstallation

A number of reports have been raised against versions 1.2.7 and 2.0.5 where the installation/uninstallation of MySQL for Visual Studio would rollback in Windows 7 environments preventing the operation from completing. We are glad to announce this has been addressed in the upcoming 1.2.8 version.

 

What is causing the failure?

It’s been identified that in most cases the rollback occurs when Visual Studio fails to execute the “devenv /updateconfiguration /log” command. Said command signals Visual Studio to merge the Visual Studio packages on the system and to check the MEF cache for any changes allowing it to register/unregister MySQL for Visual Studio. The failure is caused by faulty permissions when trying to execute any “devenv” command and is attributed to a known issue in Windows 7 environments with Visual Studio 2017 as indicated by several online reports such as:

 

Changes applied to MySQL for Visual Studio installer

MySQL for Visual Studio 1.2.8 msi installer has been updated to attempt to execute the command and to display a warning in the event that the execution fails, preventing the installation/uninstallation from rolling back. However, when said warning is raised, users are recommended to manually execute the command via the Developer Command Prompt for VS2017 to ensure the changes are reflected in Visual Studio.

The Developer Command Prompt for VS2017 is a tool included as part of the installation of Visual Studio 2017. It can be easily accessed by going to All Programs -> Visual Studio 2017 -> Visual Studio Tools. Alternatively the user can open any command prompt window and navigate to “<drive>:\Program Files (x86)\Microsoft Visual Studio\2017\<vs_version>\Common7\IDE” from where the “devenv /updateconfiguration /log” command can be executed as well.

 

Installation/uninstallation of MySQL for Visual Studio 1.2.7 / 2.0.5 workaround

As previously stated, the released versions of MySQL for Visual Studio 1.2.7 and 2.0.5 are affected by this issue, however there is a known workaround which is detailed below:

  1. If the user has custom settings set in the Visual Studio environment, proceed to export them via the Tools->Import and Export Settings option as they will be lost when executing step 2.
  2. Go to “%localappdata%\Microsoft\VisualStudio\15.0_<instance_id>” and delete the “privateregistry.bin” file.
  3. Attempt the installation/uninstallation again, it should succeed.
  4. Open Visual Studio. If for any reason Visual Studio fails to start with an “Unknown error” or any other error, again delete the “privateregistry.bin” file and then open Visual Studio.
  5. Import settings if applicable.