Method not found: IServiceCollection AddHandlebarsScaffolding
See original GitHub issueHi! Great tool, I use it daily for updating my model from db changes. It’s the best one I’ve used so far. From some days ago, I’m unable to reverse engineer my db. I get the following exception when I try to do so:
System.MissingMethodException: Method not found: 'Microsoft.Extensions.DependencyInjection.IServiceCollection Microsoft.EntityFrameworkCore.Design.ServiceCollectionExtensions.AddHandlebarsScaffolding(Microsoft.Extensions.DependencyInjection.IServiceCollection, Microsoft.EntityFrameworkCore.Design.ReverseEngineerOptions, System.ValueTuple`2<System.String,System.Action`3<System.IO.TextWriter,System.Object,System.Object[]>>[])'.
at ReverseEngineer20.EfCoreReverseEngineer.GenerateFiles(ReverseEngineerOptions reverseEngineerOptions)
at EFCorePowerTools.Handlers.ReverseEngineerHandler.<ReverseEngineerCodeFirst>d__2.MoveNext() in C:\projects\efcorepowertools\src\GUI\EFCorePowerTools\Handlers\ReverseEngineerHandler.cs:line 153
from the looks of it, it is similar to issue #35
Steps to reproduce
I guess the error started happening when I uninstalled another related tool, but to be honest, I really don’t know, so I’m asking for help. This my guess of the steps that would cause it again:
- install https://github.com/ErikEJ/SqlCeToolbox
- install https://github.com/ErikEJ/EFCorePowerTools
- uninstall SqlCeToolbox
- right click on project
- select ef core power tools -> reverse engineer
- click ok in the next 3 modals until the model generation is triggered
- The exception is shown on the output window
First I used sqlcetoolbox for a few months. then I had to stop using it due to project requirements, so I went to using the old scaffold-dbcontext. After some months I came across efcorepowertools which made us very happy for some months. and now I’m having this issue. I hope I can go back to using it soon!
Further technical details
EF Core Power Tools version: Version 1.0.612.0
SQL Server Compact 4.0 in GAC - Yes - 4.0.8876.1 SQL Server Compact 4.0 DbProvider - Yes
SQL Server Compact 4.0 DDEX provider - No SQL Server Compact 4.0 Simple DDEX provider - Yes
SQLite ADO.NET Provider included: 1.0.107.0 SQLite EF6 DbProvider in GAC - No
System.Data.SQLite DDEX provider - No SQLite Simple DDEX provider - Yes
Database engine: SQL Server
Visual Studio version: Visual studio enterprise 2017 version 15.6.6
Issue Analytics
- State:
- Created 5 years ago
- Comments:63 (44 by maintainers)
Top GitHub Comments
Daily build 629. Model generated successfully!
@rsnider Yes, but it has no handlebars 😦
@tonysneed Great!