The 'SqlSourceControlPackage' package did not load correctly The 'SqlSourceControlPackage' package did not load correctly

The 'SqlSourceControlPackage' package did not load correctly

This issue can have multiple causes:

Using an outdated SQL Source Control version

SOC is compatible with the versions of SSMS available at the time of its release.

It is good practice to always make sure that you are using the latest version of SOC if you've updated SSMS.

For example: SSMS 18.5 or newer requires SQL Source Control 7.1.19 or newer.

To update SOC to the latest compatible version, you can either enable Frequent Release Updates or open a support request so that we can provide you a direct link to the installer.

Multiple SSMS windows open

SOC will only open in the first SSMS session started if the option Allow SQL Source Control to open in Multiple Management Studio Windows is disabled (please note that starting with version 7.1.29 this option is enabled by default, in older versions the default setting is disabled).

You can workaround this by allowing SOC to open in multiple SSMS Windows:

1. On the SOC tab in SSMS, press Options (on the top bar)

2. Check the Allow SQL Source Control to open in Multiple Management Studio Windows box

3. Press OK and close SSMS

mceclip0.png

Object Explorer is not docked on the default location (left)

This is caused by an incompatibility in having SSMS's object explorer on the right side of the screen, on SSMS 2016 and 17. The recommended solution is to update to SSMS 18 or newer.

If you can't update, please follow these steps:

1. Close SSMS and uninstall SQL Source Control

2. In SSMS, either move Object Explorer to the left (default position) or select "Reset Window Layout" on the Window menu

3. Re-install SQL Source Control

4. SSMS should now start correctly and you should have SQL Source Control installed

Configuration Change or Installation of another extension

Another possible cause is a configuration change or the installation of another extension.  You can get more information by examining the file:

'%APPDATA%\Microsoft\AppEnv\xx.0\ActivityLog.xml'.

If the stack trace leading up to the error looks similar to below:

Exception details:
System.Runtime.InteropServices.COMException (0x80004005): Error HRESULT E_FAIL has been returned from a call to a COM component.
at Microsoft.VisualStudio.Shell.Interop.IVsShell5.LoadPackageWithContext(Guid& packageGuid, Int32 reason, Guid& context)
at Microsoft.VisualStudio.Platform.WindowManagement.WindowFrame.GetPackage()
at Microsoft.VisualStudio.Platform.WindowManagement.WindowFrame.ConstructContent()