Description:
On fresh installations of Microsoft Visual Studio Community 2019 (Version 16.10.0) and MySQL for Visual Studio 1.2.9, whenever I try to create a new MySQL script I get "The 'MySQL for Visual Studio 1.2.9' package did not load correctly. The problem may have been caused by a configuration change or by the installation of another extension. You can get more information by examining the file ...\ActivityLog.xml'. Restarting Visual Studio could help resolve this issue."
I tried restarting and reinstalling the MySQL extension, with no success.
Below an extract of the ActivityLog.xml.
<entry>
<record>946</record>
<time>2021/06/02 14:57:00.810</time>
<type>Information</type>
<source>VisualStudio</source>
<description>Begin package load [MySQL for Visual Studio 1.2.9]</description>
<guid>{79A115C9-B133-4891-9E7B-242509DAD272}</guid>
</entry>
<entry>
<record>947</record>
<time>2021/06/02 14:57:00.812</time>
<type>Error</type>
<source>VisualStudio</source>
<description>CreateInstance failed for package [MySQL for Visual Studio 1.2.9]Source: 'mscorlib' Description: Exception has been thrown by the target of an invocation.
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Exception: Creating second instance of package
 at MySql.Data.VisualStudio.MySqlDataProviderPackage..ctor()
 --- End of inner exception stack trace ---
 at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
 at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
 at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
 at System.Activator.CreateInstance(Type type, Boolean nonPublic)
 at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark)
 at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
 at System.Activator.CreateInstanceFromInternal(String assemblyFile, String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, Evidence securityInfo)
 at System.AppDomain.CreateInstanceFrom(String assemblyFile, String typeName)System.Exception: Creating second instance of package
 at MySql.Data.VisualStudio.MySqlDataProviderPackage..ctor()</description>
<guid>{79A115C9-B133-4891-9E7B-242509DAD272}</guid>
<hr>80004005 - E_FAIL</hr>
<errorinfo></errorinfo>
</entry>
</activity>
The versions installed of Visual Studio.
Microsoft Visual Studio Community 2019
Version 16.10.0
VisualStudio.16.Release/16.10.0+31321.278
Microsoft .NET Framework
Version 4.8.04084
Installed Version: Community
C# Tools 3.10.0-4.21269.26+029847714208ebe49668667c60ea5b0a294e0fcb
C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.
Cookiecutter 16.10.21111.19
Provides tools for finding, instantiating and customizing templates in cookiecutter format.
NuGet Package Manager 5.10.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit https://docs.nuget.org/
ProjectServicesPackage Extension 1.0
ProjectServicesPackage Visual Studio Extension Detailed Info
Python 16.10.21111.19
Provides IntelliSense, projects, templates, debugging, interactive windows, and other support for Python developers.
Python - Profiling support 16.10.21111.19
Profiling support for Python projects.
Visual Basic Tools 3.10.0-4.21269.26+029847714208ebe49668667c60ea5b0a294e0fcb
Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.
Visual Studio Code Debug Adapter Host Package 1.0
Interop layer for hosting Visual Studio Code debug adapters in Visual Studio
How to repeat:
Install
Microsoft Visual Studio Community 2019 (Version 16.10.0)
MySQL for Visual Studio 1.2.9
Open Microsoft Visual Studio Community 2019.
File -> New -> File -> MySQL -> MySQL script -> Open.