You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Npgsql PostgreSQL Integration Extension - Could not load file or assembly 'Microsoft.VisualStudio.Shell.15.0' #2897
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
I suspect that this commit here is to blame: 095476f
According to #2670 (comment) this problem should be fixed, but perhaps that fix doesn't work anymore or @roji forgot to upload newer VS2017 compatible versions of the package to the Marketplace?
Unless I'm mistaken, @ErikEJ's Power Tools extension can do that. Otherwise you can keep using existing versions of the extension - we're just not updating or supporting it any more.
@ErikEJ, The discussion is about maintaining existing .NET Framework code, based on database first model.
I do use Power Tools for EF, both old and Core edition, but I am under the impression that a tool like SqlCeToolbox would be needed to replace Npgsql PostgreSQL Integration Extension.
@gcapnias yes, you are! 😁
EF Core Power Tools supports SQLite, Firebird and SQL Azure MFA without DDEX/VS integration. If needed, I can also include PostgreSQL in that bucket, but I was under the impression that a DDEX provider for VS 2019 existed...
@ErikEJ an Npgsql DDEX provider existed, but we no longer really support it; the existing (older) versions should work just fine, but if someone needs to use a newer version of Npgsql for some reason, that wouldn't be possible.
Well, the thing is that people have had various issues with making the VSIX work correctly (that's part of the reason I ended up not supporting it), so if everything could work without DDEX that would be even better :)
I am overwhelmed as well, but not quite convinced how EF Core Tools, are going to work with visual Studio 2017/2019 .edmx designers. I believe that a DDEX provider should be in place, in order existing designers to work.
I do use SqlCeToolbox in order to maintain 10 years old code based on Sql Compact v3.5 & v4.0, which thanks to SqlCeToolbox I converted from EF 5.x to EF.6.x.
I know, I am grateful for including PostgreSQL in EF Core Tools, it will be a push to create applications in .NET Core for me.
My disagreement about shutting down VSIX, was about loosing support of existing tools in current versions of Visual Studio.
There is code, using .NET Framework 4.x (EF 5.x/EF 6.x), currently in production, working just fine. From time to time, there are minor hotfixes to be implemented - changes is database schema, that have to reflect in application code. If VSIX/DDEX support goes away, existing EF toolchain breaks. No-one will be able using EF 6.x designers to update EF DbContext; there is no other tool to update existing .edmx files.
One cannot migrate all code in .NET Core and EF Core.
I believe, it needs to exist basic support for PostgreSQL in order to keep existing toolchain running under VS2019, at least. I do understand shutting down VSIX/DDEX, with an eye looking forward. But, with the other eye, is just like forgetting what brought us here...
Old code has to live too... That why I was talking moving DDEX support in SqlCeToolbox.
@gcapnias in a nutshell, old code indeed has to live too - but you can't expect all the tools you're using to continue supporting you in their latest versions. As I wrote above, it's perfectly fine to use the already-existing versions of the VSIX (versions 4.0 and 4.1); no support is lost, and the VSIX should work in VS2019. If a critical Npgsql bugfix is needed I can even produce new patch versions for these. But requiring Npgsql to forever support .NET Framework and the VSIX so that old applications can work with the newest versions of the driver does not seem reasonable.
For background, supporting the VSIX was quite an attention drag, since the way things worked made it difficult to get things consistently right and almost impossible to debug when users hit into problems. Nobody from the community was particularly interested in stepping up, so eventually we decided to not keep spending the time on it.
@ErikEJ you can look at any of the v4.1 release tags to see the source code for the VSIX.
Activity
CGBMiguel commentedon May 28, 2020
I have de same problem, any solution?
heinmulder commentedon Jun 10, 2020
Same here! Is there any status? Are there any consequenties in the use of VS 2017?
CGBMiguel commentedon Jun 10, 2020
In VS 2019 work perfectly
lopezcjf commentedon Jul 2, 2020
Anyone found a solution for this?
LuisTayupanda commentedon Jul 7, 2020
Alguien ya encontro la solucion a este inconveniente en VS 2017?
pmishkin commentedon Jul 8, 2020
Same issue here with VS2017 at least
harishbatchu commentedon Oct 13, 2020
Same issue here with VS2017
agworkscode commentedon Nov 5, 2020
Same issue here with VS2017.
Shanayara commentedon Dec 8, 2020
This specifically affects VS2017. Basically the Marketplace version is broken for that version.
I have found a temporary fix: install the old .vsix from version 4.1.1 (later versions might work too, but there is no vsix file released for those on Github). Link: https://github.com/npgsql/npgsql/releases/download/v4.1.1/Npgsql.vsix
I suspect that this commit here is to blame: 095476f
According to #2670 (comment) this problem should be fixed, but perhaps that fix doesn't work anymore or @roji forgot to upload newer VS2017 compatible versions of the package to the Marketplace?
roji commentedon Apr 18, 2021
Closing as we no longer support the VSIX extension.
gcapnias commentedon Apr 20, 2021
Is there an alternative to use PostgreSQL within the Visual Studio?
Should I upgrade to Visual Studio to a newer version? Is there an alternative way to maintain existing database first code in .NET Framework v4.x?
Thanks!
roji commentedon Apr 20, 2021
Unless I'm mistaken, @ErikEJ's Power Tools extension can do that. Otherwise you can keep using existing versions of the extension - we're just not updating or supporting it any more.
1 remaining item
gcapnias commentedon Apr 25, 2021
@ErikEJ, The discussion is about maintaining existing .NET Framework code, based on database first model.
I do use Power Tools for EF, both old and Core edition, but I am under the impression that a tool like SqlCeToolbox would be needed to replace Npgsql PostgreSQL Integration Extension.
Am I wrong?
Regards,
George J.
ErikEJ commentedon Apr 25, 2021
@gcapnias yes, you are! 😁
EF Core Power Tools supports SQLite, Firebird and SQL Azure MFA without DDEX/VS integration. If needed, I can also include PostgreSQL in that bucket, but I was under the impression that a DDEX provider for VS 2019 existed...
roji commentedon Apr 25, 2021
@ErikEJ an Npgsql DDEX provider existed, but we no longer really support it; the existing (older) versions should work just fine, but if someone needs to use a newer version of Npgsql for some reason, that wouldn't be possible.
ErikEJ commentedon Apr 25, 2021
@roji I just use the connection string from the DDEX provider, nothing else..
roji commentedon Apr 25, 2021
Well, the thing is that people have had various issues with making the VSIX work correctly (that's part of the reason I ended up not supporting it), so if everything could work without DDEX that would be even better :)
ErikEJ commentedon Apr 25, 2021
OK! I will add support for Npgsql without DDEX then in the next release of EF Core Power Tools
roji commentedon Apr 25, 2021
Thanks @ErikEJ!
ErikEJ commentedon Apr 25, 2021
Fixed in latest daily build
roji commentedon Apr 25, 2021
That was... faster than this discussion, which was already pretty fast :)
gcapnias commentedon Apr 25, 2021
I am overwhelmed as well, but not quite convinced how EF Core Tools, are going to work with visual Studio 2017/2019 .edmx designers. I believe that a DDEX provider should be in place, in order existing designers to work.
I do use SqlCeToolbox in order to maintain 10 years old code based on Sql Compact v3.5 & v4.0, which thanks to SqlCeToolbox I converted from EF 5.x to EF.6.x.
George J.
ErikEJ commentedon Apr 25, 2021
As you can see form the changes it was a very simple change
@gcapnias This change only relates to EF Core Power Tools! Nothing to do with .edmx and EF6.
gcapnias commentedon Apr 25, 2021
:-)
I know, I am grateful for including PostgreSQL in EF Core Tools, it will be a push to create applications in .NET Core for me.
My disagreement about shutting down VSIX, was about loosing support of existing tools in current versions of Visual Studio.
There is code, using .NET Framework 4.x (EF 5.x/EF 6.x), currently in production, working just fine. From time to time, there are minor hotfixes to be implemented - changes is database schema, that have to reflect in application code. If VSIX/DDEX support goes away, existing EF toolchain breaks. No-one will be able using EF 6.x designers to update EF DbContext; there is no other tool to update existing .edmx files.
One cannot migrate all code in .NET Core and EF Core.
I believe, it needs to exist basic support for PostgreSQL in order to keep existing toolchain running under VS2019, at least. I do understand shutting down VSIX/DDEX, with an eye looking forward. But, with the other eye, is just like forgetting what brought us here...
Old code has to live too... That why I was talking moving DDEX support in SqlCeToolbox.
George J.
ErikEJ commentedon Apr 25, 2021
@gcapnias got it, and SQL CE Toolbox includes primitive DDEX providers for SQLite and SQL CE 4.
But Postgress does not really relate to SQL Compact Toolbox.
@roji Was the VSIX source removed from this repo at some point? I could revive just enough of it to use with EF6 wizard, perhaps.
roji commentedon Apr 25, 2021
@gcapnias in a nutshell, old code indeed has to live too - but you can't expect all the tools you're using to continue supporting you in their latest versions. As I wrote above, it's perfectly fine to use the already-existing versions of the VSIX (versions 4.0 and 4.1); no support is lost, and the VSIX should work in VS2019. If a critical Npgsql bugfix is needed I can even produce new patch versions for these. But requiring Npgsql to forever support .NET Framework and the VSIX so that old applications can work with the newest versions of the driver does not seem reasonable.
For background, supporting the VSIX was quite an attention drag, since the way things worked made it difficult to get things consistently right and almost impossible to debug when users hit into problems. Nobody from the community was particularly interested in stepping up, so eventually we decided to not keep spending the time on it.
@ErikEJ you can look at any of the v4.1 release tags to see the source code for the VSIX.
roji commentedon Jun 23, 2022
FYI in case it's relevant, I've just release v4.1.12 of the VSIX which adds VS2022 support.