question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Method not found: IServiceCollection AddHandlebarsScaffolding

See original GitHub issue

Hi! 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:

  1. install https://github.com/ErikEJ/SqlCeToolbox
  2. install https://github.com/ErikEJ/EFCorePowerTools
  3. uninstall SqlCeToolbox
  4. right click on project
  5. select ef core power tools -> reverse engineer
  6. click ok in the next 3 modals until the model generation is triggered
  7. 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:closed
  • Created 5 years ago
  • Comments:63 (44 by maintainers)

github_iconTop GitHub Comments

3reactions
miguelhughescommented, Jun 25, 2018

Daily build 629. Model generated successfully!

2reactions
ErikEJcommented, Jun 22, 2018

@rsnider Yes, but it has no handlebars 😦

@tonysneed Great!

Read more comments on GitHub >

github_iconTop Results From Across the Web

c# - AddHandlebarsScaffolding with Entity Framework
The command working well with this configuration. It's adding my class to all generated classes, but now I want to ignore some class...
Read more >
Method not found: System.MissingMethodException
I am upgrading .net core web api 2.2 to .net core 3.1 while runtime i am getting error like , 'Microsoft.Extensions.DependencyInjection.
Read more >
Customize EF Core Scaffolding with Handlebars Templates
While that doesn't present too much difficulty, there has not been a way to customize classes generated by the EF Core tooling.
Read more >
EntityFrameworkCore.Scaffolding.Handlebars 3.0.0
Allows customization of classes reverse engineered from an existing database using the Entity Framework Core toolchain with Handlebars templates.
Read more >
EntityFrameworkCore.Scaffolding.Handlebars 7.0.0 on ...
Allows customization of classes reverse engineered from an existing database using the Entity Framework Core toolchain with Handlebars templates.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found