Unable to run Update-Databe
Posted: Tue 26 May 2015 15:24
I've updated my dotConnect version to the last one and now I am getting this error:
update-database -verbose
Using StartUp project 'SIVI.PortalCliente'.
Using NuGet project 'SIVI.PortalCliente'.
Specify the '-Verbose' flag to view the SQL statements being applied to the target database.
System.TypeLoadException: Inheritance security rules violated by type: 'Devart.Common.Entity.Migrations.DbConnectionInfoBase'. Derived types must either match the security accessibility of the base type or be less accessible.
at SIVI.PortalCliente.Migrations.Configuration..ctor()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Data.Entity.Migrations.Utilities.MigrationsConfigurationFinder.FindMigrationsConfiguration(Type contextType, String configurationTypeName, Func`2 noType, Func`3 multipleTypes, Func`3 noTypeWithName, Func`3 multipleTypesWithName)
at System.Data.Entity.Migrations.Design.ToolingFacade.BaseRunner.FindConfiguration()
at System.Data.Entity.Migrations.Design.ToolingFacade.BaseRunner.GetMigrator()
at System.Data.Entity.Migrations.Design.ToolingFacade.UpdateRunner.Run()
at System.AppDomain.DoCallBack(CrossAppDomainDelegate callBackDelegate)
at System.AppDomain.DoCallBack(CrossAppDomainDelegate callBackDelegate)
at System.Data.Entity.Migrations.Design.ToolingFacade.Run(BaseRunner runner)
at System.Data.Entity.Migrations.Design.ToolingFacade.Update(String targetMigration, Boolean force)
at System.Data.Entity.Migrations.UpdateDatabaseCommand.<>c__DisplayClass2.<.ctor>b__0()
at System.Data.Entity.Migrations.MigrationsDomainCommand.Execute(Action command)
Inheritance security rules violated by type: 'Devart.Common.Entity.Migrations.DbConnectionInfoBase'. Derived types must either match the security accessibility of the base type or be less accessible.
I'm using the last version of dotConnect and EF 6.1.0.
update-database -verbose
Using StartUp project 'SIVI.PortalCliente'.
Using NuGet project 'SIVI.PortalCliente'.
Specify the '-Verbose' flag to view the SQL statements being applied to the target database.
System.TypeLoadException: Inheritance security rules violated by type: 'Devart.Common.Entity.Migrations.DbConnectionInfoBase'. Derived types must either match the security accessibility of the base type or be less accessible.
at SIVI.PortalCliente.Migrations.Configuration..ctor()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Data.Entity.Migrations.Utilities.MigrationsConfigurationFinder.FindMigrationsConfiguration(Type contextType, String configurationTypeName, Func`2 noType, Func`3 multipleTypes, Func`3 noTypeWithName, Func`3 multipleTypesWithName)
at System.Data.Entity.Migrations.Design.ToolingFacade.BaseRunner.FindConfiguration()
at System.Data.Entity.Migrations.Design.ToolingFacade.BaseRunner.GetMigrator()
at System.Data.Entity.Migrations.Design.ToolingFacade.UpdateRunner.Run()
at System.AppDomain.DoCallBack(CrossAppDomainDelegate callBackDelegate)
at System.AppDomain.DoCallBack(CrossAppDomainDelegate callBackDelegate)
at System.Data.Entity.Migrations.Design.ToolingFacade.Run(BaseRunner runner)
at System.Data.Entity.Migrations.Design.ToolingFacade.Update(String targetMigration, Boolean force)
at System.Data.Entity.Migrations.UpdateDatabaseCommand.<>c__DisplayClass2.<.ctor>b__0()
at System.Data.Entity.Migrations.MigrationsDomainCommand.Execute(Action command)
Inheritance security rules violated by type: 'Devart.Common.Entity.Migrations.DbConnectionInfoBase'. Derived types must either match the security accessibility of the base type or be less accessible.
I'm using the last version of dotConnect and EF 6.1.0.