Bug #104515 Configuration Update Tool Fails
Submitted: 2 Aug 2021 23:00 Modified: 5 Aug 2021 11:15
Reporter: David Gilman Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Visual Studio Integration Severity:S1 (Critical)
Version:1.2.10 OS:Windows
Assigned to: CPU Architecture:ARM

[2 Aug 2021 23:00] David Gilman
Description:
(Note: after this failure I tried removing mysql for vs and re-adding. Same problem occurred).

After upgrading from 1.2.9 to 1.2.10:

Unhandled exeception has occurred...
Could not load file or assembly 'MySql.VisualStudio.Customaction.Version=1.0.1.0. Culture=neutral, PublicKeyToken=d63c724d1883763' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040).

Details from error message:

See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.IO.FileLoadException: Could not load file or assembly 'MySql.VisualStudio.CustomAction, Version=1.0.1.0, Culture=neutral, PublicKeyToken=d63c724d1883f763' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
File name: 'MySql.VisualStudio.CustomAction, Version=1.0.1.0, Culture=neutral, PublicKeyToken=d63c724d1883f763'
   at MySql.VisualStudio.Updater.UpdaterMainForm.UpdatePkgDefFiles()
   at MySql.VisualStudio.Updater.UpdaterMainForm.<Initialize>b__7_0()
   at System.Threading.Tasks.Task.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at MySql.VisualStudio.Updater.UpdaterMainForm.<Initialize>d__7.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.<ThrowAsync>b__6_0(Object state)

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

************** Loaded Assemblies **************
mscorlib
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4400.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
MySql.VisualStudio.Updater
    Assembly Version: 0.0.0.0
    Win32 Version: 0.0.0.0
    CodeBase: file:///C:/Program%20Files%20(x86)/MySQL/MySQL%20for%20Visual%20Studio%201.2/Dependencies/MySql.VisualStudio.Updater.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4400.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4360.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------

How to repeat:
Run upgrade from 1.2.9 to 1.2.10. Load Visual Studio (am using Community Edition 16.10.4). Load a mysql script into editor window. VS prompts to run update config tool. Accept. Error pops. If continue selected it will hang.
[3 Aug 2021 1:46] David Gilman
Additional information. Created a connection to a mysql db using server explorer / Data Connections / new connection. That worked fine. Able to run a query. After playing around with this and closing the connection I tried viewing a script and it now works. Extension manager reports it is v. 1.2.10 even though upgrade tool NEVER successfully ran.
[5 Aug 2021 11:15] MySQL Verification Team
Hello David Gilman,

Thank you for the bug report.
Verified as described.

Regards,
Ashwini Patil
[5 Aug 2021 11:18] MySQL Verification Team
test results

Attachment: 104515_test_results.docx (application/vnd.openxmlformats-officedocument.wordprocessingml.document, text), 165.65 KiB.

[7 Aug 2021 4:25] Jose Ramirez
Sorry for the inconveniences.
A workaround that can be used to prevent the prompt to run the Configuration Update Tool would be to remove your current installation of MySQL for Visual Studio and installing the latest version 1.2.10. This would enable the configurations to be initially set as required.

Additionally, note that the tool is only required in a select few use-cases, if you require the basic functionality (such as performing most operations from the server explorer) then running the tool may end up not being needed. To hide the prompt permanently you could check the "Do not show" again checkbox and click the "No" button when the tool prompt appears.
[2 Aug 2022 15:35] Ragnar Engnes
I have just setup a new machine with Visual Studio 2019 just because you still does not support VS 2022. I selected the latest version of VS 2019 (16.11.17) and this problem still occur. 
Can you please do something with this?