ErikEJ / EFCorePowerTools

Entity Framework Core Power Tools - reverse engineering, migrations and model visualization in Visual Studio & CLI
MIT License
2.12k stars 293 forks source link

Reverse Engineer Fails with Error "An assembly specified in the application dependencies manifest (efreveng50.deps.json) was not found" #980

Closed jbutlerAG closed 3 years ago

jbutlerAG commented 3 years ago

When trying to reverse engineer a database using EF Core 5 option, the process results in an error displayed to the Output Window (see below for exception). When switching to EF Core 3 option, the reverse engineer process works as expected. This has been setup on a project for a few weeks and working fine with the EF Core 5 option.

I received a different error a few days ago (sorry can't remember what it was). I found an issue on Github that suggested updating to a more recent Visual Studio version, which I did. Today when trying to reverse engineer I received the message below. I tried updating Visual Studio again. I'm am now on the latest version of Visual Studio 2019 and EF Core Power Tools.

System.Exception: Table list error: Unable to launch external process: Error: Error: An assembly specified in the application dependencies manifest (efreveng50.deps.json) was not found: package: 'Microsoft.SqlServer.DacFx', version: '150.5084.2' path: 'lib/netstandard2.0/Microsoft.Data.Tools.Schema.Sql.dll'

at List EFCorePowerTools.Handlers.ReverseEngineer.ResultDeserializer.BuildTableResult(string output) at async Task<List> EFCorePowerTools.Handlers.ReverseEngineer.EfRevEngLauncher.GetTablesInternalAsync(string arguments) at async Task<List> EFCorePowerTools.Handlers.ReverseEngineer.EfRevEngLauncher.GetTablesAsync(string connectionString, DatabaseType databaseType, SchemaInfo[] schemas) at async Task<List> EFCorePowerTools.Handlers.ReverseEngineer.TableListBuilder.GetTableDefinitionsAsync(CodeGenerationMode codeGenerationMode) at async Task<List> EFCorePowerTools.Handlers.ReverseEngineer.ReverseEngineerHandler.GetTablesAsync(DatabaseConnectionModel dbInfo, CodeGenerationMode codeGenerationMode, SchemaInfo[] schemas) at async Task EFCorePowerTools.Handlers.ReverseEngineer.ReverseEngineerHandler.LoadDataBaseObjectsAsync(ReverseEngineerOptions options, DatabaseConnectionModel dbInfo, Tuple<List, string> namingOptionsAndPath) at async Task EFCorePowerTools.Handlers.ReverseEngineer.ReverseEngineerHandler.ReverseEngineerCodeFirstAsync(Project project, string optionsPath, bool onlyGenerate)

Steps to reproduce

Reverse Engineer the database using EF Core 5 in stead of EF Core 3 option.

Further technical details

EF Core Power Tools version: 2.5.649

Database engine: SQL Server 2016

Visual Studio version: Visual Studio 2019 16.9.5

ErikEJ commented 3 years ago

Try to delete the %temp%\efpt folders

jbutlerAG commented 3 years ago

@ErikEJ - Thanks! Deleting those temp folders resolved the issue.