The 'SQLChangeAutomationVSPackage' did not load correctly

If you are getting this error message when opening a solution in VS:

The ''SQLChangeAutomationVSPackage' package did not load correctly.

You can get more information about what's causing this by examining the file:

'C:\Users\Username\AppData\Roaming\Microsoft\VisualStudio\15.0\ActivityLog.xml'.

In some cases, you may be able to workaround this error by opening SQL Change Automation before opening your solution.

If the issue is not clear from the file, please log a ticket and include your ActivityLog.xml file as well as a screenshot of the error.

If you do not use SQL Change Automation and installed it by mistake, however, you can simply uninstall it. You can do this from Tools>Extensions and Updates, or if you had installed the free SQL Change Automation Core as part of Visual Studio, you can uninstall by modifying the Visual Studio install in Control Panel and removing the SQL Change Automation Core (or ReadyRoll Core) component. 

Known causes

Incompatibility between the Serilog library used by SQL Change Automation for Visual and Github for Visual Studio

Github for Visual Studio uses an older version of the Serilog library

This will usually result in an error message inside the Activitylog.xml like this:

<type>Error</type>
<source>VisualStudio</source>
<description>SetSite failed for package [SqlChangeAutomationVsPackage]Source: &apos;RedGate.Versioning.Engine.Shared.Logging.Serilog&apos; Description: Method not found: &apos;Serilog.LoggerConfiguration Serilog.FileLoggerConfigurationExtensions.File(Serilog.Configuration.LoggerSinkConfiguration, System.String, Serilog.Events.LogEventLevel, System.String, System.IFormatProvider, System.Nullable`1&lt;Int64&gt;, Serilog.Core.LoggingLevelSwitch, Boolean, Boolean, System.Nullable`1&lt;System.TimeSpan&gt;, Serilog.RollingInterval, Boolean, System.Nullable`1&lt;Int32&gt;, System.Text.Encoding)&apos;.&#x000D;&#x000A;System.MissingMethodException: Method not found: &apos;Serilog.LoggerConfiguration Serilog.FileLoggerConfigurationExtensions.File(Serilog.Configuration.LoggerSinkConfiguration, System.String, Serilog.Events.LogEventLevel, System.String, System.IFormatProvider, System.Nullable`1&lt;Int64&gt;, Serilog.Core.LoggingLevelSwitch, Boolean, Boolean, System.Nullable`1&lt;System.TimeSpan&gt;, Serilog.RollingInterval, Boolean, System.Nullable`1&lt;Int32&gt;, System.Text.Encoding)&apos;.&#x000D;&#x000A; at RedGate.Versioning.Engine.Shared.Logging.Serilog.SerilogLoggerConfiguration.Logger[T]()&#x000D;&#x000A; at RedGate.Versioning.Client.VsShell.VisualStudio.Container.VsContainer.Prepare(VsServicesCache cache, JoinableTaskFactory joinableTaskFactory, ILoggerConfiguration loggerConfiguration)&#x000D;&#x000A; at RedGate.Versioning.Client.VsShell.VisualStudio.VsPackage.EntryPoints.SqlChangeAutomationVsPackage.&lt;InitializeAsync&gt;d__2.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A; at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)&#x000D;&#x000A; at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A; at Microsoft.VisualStudio.Shell.AsyncPackage.&lt;&gt;c__DisplayClass16_0.&lt;&lt;Microsoft-VisualStudio-Shell-Interop-IAsyncLoadablePackageInitialize-Initialize&gt;b__1&gt;d.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A; at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)&#x000D;&#x000A; at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A; at Microsoft.VisualStudio.Threading.JoinableTask.&lt;JoinAsync&gt;d__68.MoveNext()</description>

You can check if you have this extension by looking in Extensions -> Manage Extensions 

f you have this extension please try the following workaround:

1- Close Visual Studio
2 - Back up the following files in C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\Extensions\Github\Github\

Serilog.dll
Serilog.Enrichers.Thread.dll
Serilog.Extensions.Logging.dll
Serilog.Sinks.Console.dll
Serilog.Sinks.File.dll


3 - Replace the file you've backed up in step 1 with the same name files from C:\ProgramData\Downloaded Installations\5E80012B9BFCA6976DE9380DB234AB38\MSBuild\SqlChangeAutomation\
4 - Restart Visual Studio

 

Was this article helpful?

4 out of 18 found this helpful
Have more questions? Submit a request