TrackableEntities / EntityFrameworkCore.Scaffolding.Handlebars

Scaffold EF Core models using Handlebars templates.
MIT License
210 stars 53 forks source link

Could not load file or assembly 'Handlebars, Version=1.9.4.0 #25

Closed jorgegarmilla closed 5 years ago

jorgegarmilla commented 6 years ago

In step 5 I receive exception described below. I am using ASP Core 2.1....

System.IO.FileLoadException: Could not load file or assembly 'Handlebars, Version=1.9.4.0, Culture=neutral, PublicKeyToken=22225d0bf33cd661'. A strongly-named assembly is required. (Exception from HRESULT: 0x80131044) File name: 'Handlebars, Version=1.9.4.0, Culture=neutral, PublicKeyToken=22225d0bf33cd661' ---> System.IO.FileLoadException: A strongly-named assembly is required. (Exception from HRESULT: 0x80131044) at EntityFrameworkCore.Scaffolding.Handlebars.HbsHelperService.RegisterHelpers() at EntityFrameworkCore.Scaffolding.Handlebars.HbsCSharpModelGenerator.GenerateModel(IModel model, String namespace, String contextDir, String contextName, String connectionString, ModelCodeGenerationOptions options) at Microsoft.EntityFrameworkCore.Design.Internal.DatabaseOperations.ScaffoldContext(String provider, String connectionString, String outputDir, String outputContextDir, String dbContextClassName, IEnumerable1 schemas, IEnumerable1 tables, Boolean useDataAnnotations, Boolean overwriteFiles, Boolean useDatabaseNames) at Microsoft.EntityFrameworkCore.Design.OperationExecutor.ScaffoldContextImpl(String provider, String connectionString, String outputDir, String outputDbContextDir, String dbContextClassName, IEnumerable1 schemaFilters, IEnumerable1 tableFilters, Boolean useDataAnnotations, Boolean overwriteFiles, Boolean useDatabaseNames) at Microsoft.EntityFrameworkCore.Design.OperationExecutor.ScaffoldContext.<>cDisplayClass0_1.<.ctor>b0() at Microsoft.EntityFrameworkCore.Design.OperationExecutor.OperationBase.<>cDisplayClass3_0`1.b0() at Microsoft.EntityFrameworkCore.Design.OperationExecutor.OperationBase.Execute(Action action)

jorgegarmilla commented 6 years ago

I installed nuget package "Handlerbars.Net" (v 1.9.4) but it still happens

tonysneed commented 6 years ago

Are you getting this error with the latest version?

tonysneed commented 5 years ago

This should be fixed in the current version. Otherwise, please re-open.

jorgegarmilla commented 5 years ago

Thanks Tony. It worked as expected... reading what has been generated. Looks really good ;-)