npgsql: Npgsql PostgreSQL Integration Extension - Could not load file or assembly 'Microsoft.VisualStudio.Shell.15.0'

Steps to reproduce

  1. Install Npgsql PostgreSQL Integration
  2. Open Visual Studio
  3. Getting following error Error

The issue

Exception message:
Stack trace: 
CreateInstance failed for package [NpgsqlVSPackage]Source: 'mscorlib' Description:
Could not load file or assembly 'Microsoft.VisualStudio.Shell.15.0, Version=16.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=16.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=16.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) 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].
--

Further technical details

Npgsql version: 4.1.3 PostgreSQL version: 10.12 Operating system: Windows 10 Pro IDE: Visual Studio Enterprise 2017

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 2
  • Comments: 28 (15 by maintainers)

Most upvoted comments

OK! I will add support for Npgsql without DDEX then in the next release of EF Core Power Tools

Closing as we no longer support the VSIX extension.

FYI in case it’s relevant, I’ve just release v4.1.12 of the VSIX which adds VS2022 support.

Fixed in latest daily build

Thanks @ErikEJ!

EF Core Power Tools only supports VS 2019, but I see no reason why a 2017 user should not be able to use 2019.