EFCore.Pluralizer icon indicating copy to clipboard operation
EFCore.Pluralizer copied to clipboard

Could not load file or assembly Bricelam.EntityFrameworkCore.Pluralizer

Open adoconnection opened this issue 5 years ago • 3 comments

Hello, Brice! Im having trouble using pluralizer on NETCore 3.1 + EFCore.3.1.1

running Install-Package Bricelam.EntityFrameworkCore.Pluralizer - ok

on Scaffold-DbContext I get this exception

System.IO.FileNotFoundException: Could not load file or assembly 'Bricelam.EntityFrameworkCore.Pluralizer, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
File name: 'Bricelam.EntityFrameworkCore.Pluralizer, Culture=neutral, PublicKeyToken=null'
   at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, StackCrawlMarkHandle stackMark, ObjectHandleOnStack assemblyLoadContext, Boolean loadTypeFromPartialName, ObjectHandleOnStack type, ObjectHandleOnStack keepalive)
   at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, StackCrawlMark& stackMark, AssemblyLoadContext assemblyLoadContext, Boolean loadTypeFromPartialName)
   at System.RuntimeType.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase, StackCrawlMark& stackMark)
   at System.Type.GetType(String typeName, Boolean throwOnError)
   at Microsoft.EntityFrameworkCore.Design.Internal.DesignTimeServicesBuilder.ConfigureReferencedServices(IServiceCollection services, String provider)
   at Microsoft.EntityFrameworkCore.Design.Internal.DesignTimeServicesBuilder.Build(String provider)
   at Microsoft.EntityFrameworkCore.Design.Internal.DatabaseOperations.ScaffoldContext(String provider, String connectionString, String outputDir, String outputContextDir, String dbContextClassName, IEnumerable`1 schemas, IEnumerable`1 tables, Boolean useDataAnnotations, Boolean overwriteFiles, Boolean useDatabaseNames)
   at Microsoft.EntityFrameworkCore.Design.OperationExecutor.ScaffoldContextImpl(String provider, String connectionString, String outputDir, String outputDbContextDir, String dbContextClassName, IEnumerable`1 schemaFilters, IEnumerable`1 tableFilters, Boolean useDataAnnotations, Boolean overwriteFiles, Boolean useDatabaseNames)
   at Microsoft.EntityFrameworkCore.Design.OperationExecutor.ScaffoldContext.<>c__DisplayClass0_0.<.ctor>b__0()
   at Microsoft.EntityFrameworkCore.Design.OperationExecutor.OperationBase.<>c__DisplayClass3_0`1.<Execute>b__0()
   at Microsoft.EntityFrameworkCore.Design.OperationExecutor.OperationBase.Execute(Action action)


Could not load file or assembly 'Bricelam.EntityFrameworkCore.Pluralizer, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.

dont have any idea why is that, please help

adoconnection avatar Feb 06 '20 21:02 adoconnection

Do you have multiple projects? If so, make sure you install it into your startup app

bricelam avatar Feb 11 '20 23:02 bricelam

Also, there is a workaround: you can remove the contents of PackageReference tag to Bricelam.Xxx (IncludeAssets etc), then it works with other assemblies too.

ssg avatar Mar 17 '20 18:03 ssg

Note to self: Consider using transitive build artifacts.

bricelam avatar Sep 22 '20 20:09 bricelam