0

I tried

  • set connection string of "appsettings.json" name to "Settings.ConnectionStringName" in database.tt in .net core and kept getting
  • kept getting "Running transformation: Failed to find providerName in the connection string" error when database.tt was saved.
  • copied connection string to "Settings.ConnectionStringName" from "appsettings.json", btw, everything works well in code first EF project.

Settings.ConnectionStringName = "server=XXXX; Database=TCS_Shenyi;Trusted_Connection=True;MultipleActiveResultSets=true;";

I still get the same error:

EF Reverse POCO Generator: Failed to load provider EntityClient using .net core appsettings.json

1 Answer 1

0
  1. The v2 is not compatible with .Net Core. Please use this one located on DropBox This is the new v3 which is not yet released, and is compatible with .net core 2 & 3

  2. Modify database.tt setting of following items

    • Settings.ConnectionString from your appsettings.json
    • Settings.ConnectionStringName from your appsettings.json
    • Settings.TemplateType = TemplateType.EfCore2; (or 3, etc)
    • Settings.GeneratorType = GeneratorType.EfCore;

Otherwise, you will get following error. Replace EF 6.0 with EF core

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.