Getting SerializationException when running add-migration

autofac c# entity-framework-6

Question

add-migration v3_80 -ConnectionStringName MyMigrations yields me a serializationException Type is not resolved for member 'Autofac.Core.DependencyResolutionException,Autofac, Version=4.1.1.0, Culture=neutral, PublicKeyToken=17863af14b0044da'

I have looked through solutions and there seem to be 2 known possibilities. One being an ampersand in a directory name and another being some of the projects being a different .Net version. I have verified I have no ampersands and all projects are version 4.6.1. Not sure where to go now to resolve this error.

Here is output with verbose PM> add-migration v3_80 -ConnectionStringName MyMigrations -Verbose Using StartUp project 'Nop.Plugin.Misc.HuntNBuddies'. Using NuGet project 'Nop.Plugin.Misc.HuntNBuddies'. System.Runtime.Serialization.SerializationException: Type is not resolved for member 'Autofac.Core.DependencyResolutionException,Autofac, Version=4.1.1.0, Culture=neutral, PublicKeyToken=17863af14b0044da'. at System.AppDomain.DoCallBack(CrossAppDomainDelegate callBackDelegate) at System.Data.Entity.Migrations.Design.ToolingFacade.Run(BaseRunner runner) at System.Data.Entity.Migrations.Design.ToolingFacade.Scaffold(String migrationName, String language, String rootNamespace, Boolean ignoreChanges) at System.Data.Entity.Migrations.AddMigrationCommand.Execute(String name, Boolean force, Boolean ignoreChanges) at System.Data.Entity.Migrations.AddMigrationCommand.<>c__DisplayClass2.<.ctor>b__0() at System.Data.Entity.Migrations.MigrationsDomainCommand.Execute(Action command) Type is not resolved for member 'Autofac.Core.DependencyResolutionException,Autofac, Version=4.1.1.0, Culture=neutral, PublicKeyToken=17863af14b0044da'. PM>

1
0
10/10/2016 4:26:27 PM

Popular Answer

This error message is a known bug in Entity Framework and is fixed in 6.2. I have a workaround to figure out what is wrong that I answered here:

New embedded Firebird, code first, EF6 project results in SerializationException

1
5/23/2017 10:27:32 AM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow