Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- PM> enable-migrations -contexttypename EmployeeContext
- Checking if the context targets an existing database...
- System.TypeInitializationException: The type initializer for 'System.Data.Entity.Migrations.DbMigrationsConfiguration`1' threw an exception. ---> System.TypeInitializationException: The type initializer for 'System.Data.Entity.Internal.AppConfig' threw an exception. ---> System.Configuration.ConfigurationErrorsException: Configuration system failed to initialize ---> System.Configuration.ConfigurationErrorsException: Only one <configSections> element allowed per config file and if present must be the first child of the root <configuration> element. (C:\Users\glady\Desktop\Tutorial\MVCCMigration\MVCCMigration\tmp16CB.tmp line 10)
- at System.Configuration.ConfigurationSchemaErrors.ThrowIfErrors(Boolean ignoreLocal)
- at System.Configuration.BaseConfigurationRecord.ThrowIfParseErrors(ConfigurationSchemaErrors schemaErrors)
- at System.Configuration.BaseConfigurationRecord.ThrowIfInitErrors()
- at System.Configuration.ClientConfigurationSystem.EnsureInit(String configKey)
- --- End of inner exception stack trace ---
- at System.Configuration.ClientConfigurationSystem.EnsureInit(String configKey)
- at System.Configuration.ClientConfigurationSystem.PrepareClientConfigSystem(String sectionName)
- at System.Configuration.ClientConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection(String sectionName)
- at System.Configuration.ConfigurationManager.GetSection(String sectionName)
- at System.Configuration.ConfigurationManager.get_ConnectionStrings()
- at System.Data.Entity.Internal.AppConfig..ctor()
- at System.Data.Entity.Internal.AppConfig..cctor()
- --- End of inner exception stack trace ---
- at System.Data.Entity.Infrastructure.DependencyResolution.DbConfigurationManager.EnsureLoadedForAssembly(Assembly assemblyHint, Type contextTypeHint)
- at System.Data.Entity.Infrastructure.DependencyResolution.DbConfigurationManager.EnsureLoadedForContext(Type contextType)
- at System.Data.Entity.Migrations.DbMigrationsConfiguration`1..cctor()
- --- End of inner exception stack trace ---
- at System.Data.Entity.Migrations.DbMigrationsConfiguration`1..ctor()
- at MVCCMigration.Migrations.Configuration..ctor() in c:\Users\glady\Desktop\Tutorial\MVCCMigration\MVCCMigration\Migrations\Configuration.cs:line 10
- --- 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.ScaffoldRunner.RunCore()
- at System.Data.Entity.Migrations.Design.ToolingFacade.BaseRunner.Run()
- The type initializer for 'System.Data.Entity.Migrations.DbMigrationsConfiguration`1' threw an exception.
- PM>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement