Advertisement
gladyssann

Package Manager Console Error

Dec 12th, 2017
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.08 KB | None | 0 0
  1. PM> enable-migrations -contexttypename EmployeeContext
  2. Checking if the context targets an existing database...
  3. 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)
  4. at System.Configuration.ConfigurationSchemaErrors.ThrowIfErrors(Boolean ignoreLocal)
  5. at System.Configuration.BaseConfigurationRecord.ThrowIfParseErrors(ConfigurationSchemaErrors schemaErrors)
  6. at System.Configuration.BaseConfigurationRecord.ThrowIfInitErrors()
  7. at System.Configuration.ClientConfigurationSystem.EnsureInit(String configKey)
  8. --- End of inner exception stack trace ---
  9. at System.Configuration.ClientConfigurationSystem.EnsureInit(String configKey)
  10. at System.Configuration.ClientConfigurationSystem.PrepareClientConfigSystem(String sectionName)
  11. at System.Configuration.ClientConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection(String sectionName)
  12. at System.Configuration.ConfigurationManager.GetSection(String sectionName)
  13. at System.Configuration.ConfigurationManager.get_ConnectionStrings()
  14. at System.Data.Entity.Internal.AppConfig..ctor()
  15. at System.Data.Entity.Internal.AppConfig..cctor()
  16. --- End of inner exception stack trace ---
  17. at System.Data.Entity.Infrastructure.DependencyResolution.DbConfigurationManager.EnsureLoadedForAssembly(Assembly assemblyHint, Type contextTypeHint)
  18. at System.Data.Entity.Infrastructure.DependencyResolution.DbConfigurationManager.EnsureLoadedForContext(Type contextType)
  19. at System.Data.Entity.Migrations.DbMigrationsConfiguration`1..cctor()
  20. --- End of inner exception stack trace ---
  21. at System.Data.Entity.Migrations.DbMigrationsConfiguration`1..ctor()
  22. at MVCCMigration.Migrations.Configuration..ctor() in c:\Users\glady\Desktop\Tutorial\MVCCMigration\MVCCMigration\Migrations\Configuration.cs:line 10
  23. --- End of stack trace from previous location where exception was thrown ---
  24. at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
  25. at System.Data.Entity.Migrations.Utilities.MigrationsConfigurationFinder.FindMigrationsConfiguration(Type contextType, String configurationTypeName, Func`2 noType, Func`3 multipleTypes, Func`3 noTypeWithName, Func`3 multipleTypesWithName)
  26. at System.Data.Entity.Migrations.Design.ToolingFacade.BaseRunner.FindConfiguration()
  27. at System.Data.Entity.Migrations.Design.ToolingFacade.ScaffoldRunner.RunCore()
  28. at System.Data.Entity.Migrations.Design.ToolingFacade.BaseRunner.Run()
  29. The type initializer for 'System.Data.Entity.Migrations.DbMigrationsConfiguration`1' threw an exception.
  30. PM>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement