Default VSIX Project in Visual Studio 2022 to extend SSMS 18 (v18.12.1) does not work

Roman Bělonohý 6 Reputation points
2022-08-19T14:01:12.93+00:00

Hello,
I am trying to extend SQL Management studio with some custom commands. I tried to create DEFAULT vsix package without any modification but it does not work.
Followed this tutorial: https://www.codeproject.com/Articles/1377559/How-to-Create-SQL-Server-Management-Studio-18-SSMS

Having Visual studio 2022 and SSMS 18.12.1

Command is visible in SSMS but when I run it I get error (see attached image and xml activity log renamed to log)

I believe it is some bug of visual studio or ssms?

Thanks,

Greg

232869-activitylog.log

Community Center | Not monitored
{count} vote

1 answer

Sort by: Most helpful
  1. Roman Bělonohý 6 Reputation points
    2022-08-24T15:35:38.363+00:00

    Yes, updated to VS 17.3.2 and the same problem...

    <entry>
    <record>1069</record>
    <time>2022/08/24 14:59:10.089</time>
    <type>Information</type>
    <source>VisualStudio</source>
    <description>Begin package load [Tab Designer Launcher]</description>
    <guid>{B4E787A4-A9FC-4579-945E-D71AFEC4DD90}</guid>
    </entry>
    <entry>
    <record>1070</record>
    <time>2022/08/24 14:59:10.338</time>
    <type>Information</type>
    <source>VisualStudio</source>
    <description>End package load [Tab Designer Launcher]</description>
    <guid>{B4E787A4-A9FC-4579-945E-D71AFEC4DD90}</guid>
    </entry>
    <entry>
    <record>1071</record>
    <time>2022/08/24 15:32:37.685</time>
    <type>Information</type>
    <source>VisualStudio</source>
    <description>Entering function CVsPackageInfo::HrInstantiatePackage</description>
    <guid>{A6092DE5-EF58-4A37-8519-4DC7843BBCC6}</guid>
    </entry>
    <entry>
    <record>1072</record>
    <time>2022/08/24 15:32:37.687</time>
    <type>Information</type>
    <source>VisualStudio</source>
    <description>Begin package load [VSIXProject2018Package]</description>
    <guid>{A6092DE5-EF58-4A37-8519-4DC7843BBCC6}</guid>
    </entry>
    <entry>
    <record>1073</record>
    <time>2022/08/24 15:32:38.087</time>
    <type>Error</type>
    <source>VisualStudio</source>
    <description>CreateInstance failed for package [VSIXProject2018Package]Source: 'mscorlib' Description: Could not load file or assembly 'Microsoft.VisualStudio.Shell.15.0, Version=17.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.Shell.15.0, Version=17.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. File name: 'Microsoft.VisualStudio.Shell.15.0, Version=17.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' at System.Reflection.RuntimeAssembly.GetType(RuntimeAssembly assembly, String name, Boolean throwOnError, Boolean ignoreCase, ObjectHandleOnStack type) at System.Reflection.RuntimeAssembly.GetType(String name, Boolean throwOnError, Boolean ignoreCase) 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) === Pre-bind state information === LOG: DisplayName = Microsoft.VisualStudio.Shell.15.0, Version=17.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a (Fully-specified) LOG: Appbase = file:///C:/Program Files (x86)/Microsoft SQL Server Management Studio 18/Common7/IDE/ LOG: Initial PrivatePath = NULL Calling assembly : VSIXProject2018, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null. === LOG: This bind starts in LoadFrom load context. WRN: Native image will not be probed in LoadFrom context. Native image will only be probed in default load context, like with Assembly.Load(). LOG: Using application configuration file: C:\Users\roman.belonohy\AppData\Local\Microsoft\SQL Server Management Studio\18.0_IsoShell\Ssms.exe.config LOG: Using host configuration file: LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config. LOG: Post-policy reference: Microsoft.VisualStudio.Shell.15.0, Version=17.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft SQL Server Management Studio 18/Common7/IDE/Microsoft.VisualStudio.Shell.15.0.DLL. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft SQL Server Management Studio 18/Common7/IDE/Microsoft.VisualStudio.Shell.15.0/Microsoft.VisualStudio.Shell.15.0.DLL. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft SQL Server Management Studio 18/Common7/IDE/Extensions/Application/Microsoft.VisualStudio.Shell.15.0.DLL. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft SQL Server Management Studio 18/Common7/IDE/Extensions/Application/Microsoft.VisualStudio.Shell.15.0/Microsoft.VisualStudio.Shell.15.0.DLL. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft SQL Server Management Studio 18/Common7/IDE/PublicAssemblies/Microsoft.VisualStudio.Shell.15.0.DLL. WRN: Comparing the assembly name resulted in the mismatch: Major Version LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft SQL Server Management Studio 18/Common7/IDE/PublicAssemblies/Microsoft.VisualStudio.Shell.15.0/Microsoft.VisualStudio.Shell.15.0.DLL. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft SQL Server Management Studio 18/Common7/IDE/PrivateAssemblies/Microsoft.VisualStudio.Shell.15.0.DLL. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft SQL Server Management Studio 18/Common7/IDE/PrivateAssemblies/Microsoft.VisualStudio.Shell.15.0/Microsoft.VisualStudio.Shell.15.0.DLL. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft SQL Server Management Studio 18/Common7/IDE/CommonExtensions/Platform/Microsoft.VisualStudio.Shell.15.0.DLL. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft SQL Server Management Studio 18/Common7/IDE/CommonExtensions/Platform/Microsoft.VisualStudio.Shell.15.0/Microsoft.VisualStudio.Shell.15.0.DLL. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft SQL Server Management Studio 18/Common7/IDE/CommonExtensions/Microsoft/Editor/Microsoft.VisualStudio.Shell.15.0.DLL. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft SQL Server Management Studio 18/Common7/IDE/CommonExtensions/Microsoft/Editor/Microsoft.VisualStudio.Shell.15.0/Microsoft.VisualStudio.Shell.15.0.DLL. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft SQL Server Management Studio 18/Common7/IDE/CommonExtensions/Platform/Debugger/Microsoft.VisualStudio.Shell.15.0.DLL. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft SQL Server Management Studio 18/Common7/IDE/CommonExtensions/Platform/Debugger/Microsoft.VisualStudio.Shell.15.0/Microsoft.VisualStudio.Shell.15.0.DLL. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft SQL Server Management Studio 18/Common7/IDE/Mashup/Microsoft.VisualStudio.Shell.15.0.DLL. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft SQL Server Management Studio 18/Common7/IDE/Mashup/Microsoft.VisualStudio.Shell.15.0/Microsoft.VisualStudio.Shell.15.0.DLL. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft SQL Server Management Studio 18/Common7/IDE/Microsoft.VisualStudio.Shell.15.0.EXE. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft SQL Server Management Studio 18/Common7/IDE/Microsoft.VisualStudio.Shell.15.0/Microsoft.VisualStudio.Shell.15.0.EXE. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft SQL Server Management Studio 18/Common7/IDE/Extensions/Application/Microsoft.VisualStudio.Shell.15.0.EXE. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft SQL Server Management Studio 18/Common7/IDE/Extensions/Application/Microsoft.VisualStudio.Shell.15.0/Microsoft.VisualStudio.Shell.15.0.EXE. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft SQL Server Management Studio 18/Common7/IDE/PublicAssemblies/Microsoft.VisualStudio.Shell.15.0.EXE. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft SQL Server Management Studio 18/Common7/IDE/PublicAssemblies/Microsoft.VisualStudio.Shell.15.0/Microsoft.VisualStudio.Shell.15.0.EXE. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft SQL Server Management Studio 18/Common7/IDE/PrivateAssemblies/Microsoft.VisualStudio.Shell.15.0.EXE. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft SQL Server Management Studio 18/Common7/IDE/PrivateAssemblies/Microsoft.VisualStudio.Shell.15.0/Microsoft.VisualStudio.Shell.15.0.EXE. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft SQL Server Management Studio 18/Common7/IDE/CommonExtensions/Platform/Microsoft.VisualStudio.Shell.15.0.EXE. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft SQL Server Management Studio 18/Common7/IDE/CommonExtensions/Platform/Microsoft.VisualStudio.Shell.15.0/Microsoft.VisualStudio.Shell.15.0.EXE. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft SQL Server Management Studio 18/Common7/IDE/CommonExtensions/Microsoft/Editor/Microsoft.VisualStudio.Shell.15.0.EXE. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft SQL Server Management Studio 18/Common7/IDE/CommonExtensions/Microsoft/Editor/Microsoft.VisualStudio.Shell.15.0/Microsoft.VisualStudio.Shell.15.0.EXE. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft SQL Server Management Studio 18/Common7/IDE/CommonExtensions/Platform/Debugger/Microsoft.VisualStudio.Shell.15.0.EXE. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft SQL Server Management Studio 18/Common7/IDE/CommonExtensions/Platform/Debugger/Microsoft.VisualStudio.Shell.15.0/Microsoft.VisualStudio.Shell.15.0.EXE. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft SQL Server Management Studio 18/Common7/IDE/Mashup/Microsoft.VisualStudio.Shell.15.0.EXE. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft SQL Server Management Studio 18/Common7/IDE/Mashup/Microsoft.VisualStudio.Shell.15.0/Microsoft.VisualStudio.Shell.15.0.EXE. LOG: Attempting download of new URL file:///c:/program files (x86)/microsoft sql server management studio 18/common7/ide/extensions/helloworldssms18extension/Microsoft.VisualStudio.Shell.15.0.DLL. LOG: Attempting download of new URL file:///c:/program files (x86)/microsoft sql server management studio 18/common7/ide/extensions/helloworldssms18extension/Microsoft.VisualStudio.Shell.15.0/Microsoft.VisualStudio.Shell.15.0.DLL. LOG: Attempting download of new URL file:///c:/program files (x86)/microsoft sql server management studio 18/common7/ide/extensions/helloworldssms18extension/Microsoft.VisualStudio.Shell.15.0.EXE. LOG: Attempting download of new URL file:///c:/program files (x86)/microsoft sql server management studio 18/common7/ide/extensions/helloworldssms18extension/Microsoft.VisualStudio.Shell.15.0/Microsoft.VisualStudio.Shell.15.0.EXE. </description>
    <guid>{A6092DE5-EF58-4A37-8519-4DC7843BBCC6}</guid>
    <hr>80004005 - E_FAIL</hr>
    </entry>


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.