Проблема при включении миграции ASP.NET MVC5 на MAC - PullRequest
1 голос
/ 02 октября 2019

Я пытаюсь включить миграцию в своем проекте ASP.net на Rider.

, когда я нажимаю на Включить миграцию, создается папка миграции. Файл configuration.cs также создается, но я получаю следующее сообщение:

        11:42:16.760 |I| EntityFrameworkRunnerProgram  | :1                 | Using EntityFramework 6.3.0
11:42:17.674 |E| ScaffoldInitialMigrationRunner| :1                 | Inner exception stack trace: System.ArgumentException: Invalid value for key 'attachdbfilename'. at System.Data.SqlClient.SqlConnectionString..ctor (System.String connectionString) [0x00408] in <151ba4fcafea4819819d3594ece183c3>:0 at System.Data.SqlClient.SqlConnectionFactory.CreateConnectionOptions (System.String connectionString, System.Data.Common.DbConnectionOptions previous) [0x00000] in <151ba4fcafea4819819d3594ece183c3>:0 at System.Data.ProviderBase.DbConnectionFactory.GetConnectionPoolGroup (System.Data.Common.DbConnectionPoolKey key, System.Data.ProviderBase.DbConnectionPoolGroupOptions poolOptions, System.Data.Common.DbConnectionOptions& userConnectionOptions) [0x0003e] in <151ba4fcafea4819819d3594ece183c3>:0 at System.Data.SqlClient.SqlConnection.ConnectionString_Set (System.Data.Common.DbConnectionPoolKey key) [0x00008] in <151ba4fcafea4819819d3594ece183c3>:0 at System.Data.SqlClient.SqlConnection.set_ConnectionString (System.String value) [0x00042] in <151ba4fcafea4819819d3594ece183c3>:0 at System.Data.Entity.Infrastructure.Interception.DbConnectionDispatcher+<>c.<SetConnectionString>b__8_0 (System.Data.Common.DbConnection t, System.Data.Entity.Infrastructure.Interception.DbConnectionPropertyInterceptionContext`1[TValue] c) [0x00007] in <222b71ed74914d6ebbdbc2b580446023>:0 at System.Data.Entity.Infrastructure.Interception.InternalDispatcher`1[TInterceptor].Dispatch[TTarget,TInterceptionContext] (TTarget target, System.Action`2[T1,T2] operation, TInterceptionContext interceptionContext, System.Action`3[T1,T2,T3] executing, System.Action`3[T1,T2,T3] executed) [0x0000f] in <222b71ed74914d6ebbdbc2b580446023>:0 at System.Data.Entity.Infrastructure.Interception.DbConnectionDispatcher.SetConnectionString (System.Data.Common.DbConnection connection, System.Data.Entity.Infrastructure.Interception.DbConnectionPropertyInterceptionContext`1[TValue] interceptionContext) [0x00044] in <222b71ed74914d6ebbdbc2b580446023>:0 at System.Data.Entity.Infrastructure.SqlConnectionFactory.CreateConnection (System.String nameOrConnectionString) [0x00096] in <222b71ed74914d6ebbdbc2b580446023>:0 at System.Data.Entity.Infrastructure.LocalDbConnectionFactory.CreateConnection (System.String nameOrConnectionString) [0x00077] in <222b71ed74914d6ebbdbc2b580446023>:0 at System.Data.Entity.Internal.LazyInternalConnection.Initialize () [0x000bd] in <222b71ed74914d6ebbdbc2b580446023>:0 at System.Data.Entity.Internal.LazyInternalConnection.get_Connection () [0x00000] in <222b71ed74914d6ebbdbc2b580446023>:0 at System.Data.Entity.Internal.LazyInternalContext.get_Connection () [0x00024] in <222b71ed74914d6ebbdbc2b580446023>:0 at System.Data.Entity.Infrastructure.DbContextInfo..ctor (System.Type contextType, System.Data.Entity.Infrastructure.DbProviderInfo modelProviderInfo, System.Data.Entity.Internal.AppConfig config, System.Data.Entity.Infrastructure.DbConnectionInfo connectionInfo, System.Func`1[TResult] resolver) [0x000c8] in <222b71ed74914d6ebbdbc2b580446023>:0 at System.Data.Entity.Infrastructure.DbContextInfo..ctor (System.Type contextType, System.Func`1[TResult] resolver) [0x00012] in <222b71ed74914d6ebbdbc2b580446023>:0 at System.Data.Entity.Infrastructure.DbContextInfo..ctor (System.Type contextType) [0x00000] in <222b71ed74914d6ebbdbc2b580446023>:0 at System.Data.Entity.Migrations.DbMigrator..ctor (System.Data.Entity.Migrations.DbMigrationsConfiguration configuration, System.Data.Entity.DbContext usersContext, System.Data.Entity.Internal.DatabaseExistenceState existenceState, System.Boolean calledByCreateDatabase) [0x0006e] in <222b71ed74914d6ebbdbc2b580446023>:0 at System.Data.Entity.Migrations.DbMigrator..ctor (System.Data.Entity.Migrations.DbMigrationsConfiguration configuration) [0x00000] in <222b71ed74914d6ebbdbc2b580446023>:0 at System.Data.Entity.Migrations.Design.MigrationScaffolder..ctor (System.Data.Entity.Migrations.DbMigrationsConfiguration migrationsConfiguration) [0x00012] in <222b71ed74914d6ebbdbc2b580446023>:0 at System.Data.Entity.Migrations.Design.ToolingFacade+ScaffoldRunner.RunCore () [0x00006] in <222b71ed74914d6ebbdbc2b580446023>:0 at System.Data.Entity.Migrations.Design.ToolingFacade+BaseRunner.Run () [0x00000] in <222b71ed74914d6ebbdbc2b580446023>:0

--- EXCEPTION #1/1 [LoggerException]
Message = “
  Inner exception stack trace: System.ArgumentException: Invalid value for key 'attachdbfilename'.
    at System.Data.SqlClient.SqlConnectionString..ctor (System.String connectionString) [0x00408] in <151ba4fcafea4819819d3594ece183c3>:0 
    at System.Data.SqlClient.SqlConnectionFactory.CreateConnectionOptions (System.String connectionString, System.Data.Common.DbConnectionOptions previous) [0x00000] in <151ba4fcafea4819819d3594ece183c3>:0 
    at System.Data.ProviderBase.DbConnectionFactory.GetConnectionPoolGroup (System.Data.Common.DbConnectionPoolKey key, System.Data.ProviderBase.DbConnectionPoolGroupOptions poolOptions, System.Data.Common.DbConnectionOptions& userConnectionOptions) [0x0003e] in <151ba4fcafea4819819d3594ece183c3>:0 
    at System.Data.SqlClient.SqlConnection.ConnectionString_Set (System.Data.Common.DbConnectionPoolKey key) [0x00008] in <151ba4fcafea4819819d3594ece183c3>:0 
    at System.Data.SqlClient.SqlConnection.set_ConnectionString (System.String value) [0x00042] in <151ba4fcafea4819819d3594ece183c3>:0 
    at System.Data.Entity.Infrastructure.Interception.DbConnectionDispatcher+<>c.<SetConnectionString>b__8_0 (System.Data.Common.DbConnection t, System.Data.Entity.Infrastructure.Interception.DbConnectionPropertyInterceptionContext`1[TValue] c) [0x00007] in <222b71ed74914d6ebbdbc2b580446023>:0 
    at System.Data.Entity.Infrastructure.Interception.InternalDispatcher`1[TInterceptor].Dispatch[TTarget,TInterceptionContext] (TTarget target, System.Action`2[T1,T2] operation, TInterceptionContext interceptionContext, System.Action`3[T1,T2,T3] executing, System.Action`3[T1,T2,T3] executed) [0x0000f] in <222b71ed74914d6ebbdbc2b580446023>:0 
    at System.Data.Entity.Infrastructure.Interception.DbConnectionDispatcher.SetConnectionString (System.Data.Common.DbConnection connection, System.Data.Entity.Infrastructure.Interception.DbConnectionPropertyInterceptionContext`1[TValue] interceptionContext) [0x00044] in <222b71ed74914d6ebbdbc2b580446023>:0 
    at System.Data.Entity.Infrastructure.SqlConnectionFactory.CreateConnection (System.String nameOrConnectionString) [0x00096] in <222b71ed74914d6ebbdbc2b580446023>:0 
    at System.Data.Entity.Infrastructure.LocalDbConnectionFactory.CreateConnection (System.String nameOrConnectionString) [0x00077] in <222b71ed74914d6ebbdbc2b580446023>:0 
    at System.Data.Entity.Internal.LazyInternalConnection.Initialize () [0x000bd] in <222b71ed74914d6ebbdbc2b580446023>:0 
    at System.Data.Entity.Internal.LazyInternalConnection.get_Connection () [0x00000] in <222b71ed74914d6ebbdbc2b580446023>:0 
    at System.Data.Entity.Internal.LazyInternalContext.get_Connection () [0x00024] in <222b71ed74914d6ebbdbc2b580446023>:0 
    at System.Data.Entity.Infrastructure.DbContextInfo..ctor (System.Type contextType, System.Data.Entity.Infrastructure.DbProviderInfo modelProviderInfo, System.Data.Entity.Internal.AppConfig config, System.Data.Entity.Infrastructure.DbConnectionInfo connectionInfo, System.Func`1[TResult] resolver) [0x000c8] in <222b71ed74914d6ebbdbc2b580446023>:0 
    at System.Data.Entity.Infrastructure.DbContextInfo..ctor (System.Type contextType, System.Func`1[TResult] resolver) [0x00012] in <222b71ed74914d6ebbdbc2b580446023>:0 
    at System.Data.Entity.Infrastructure.DbContextInfo..ctor (System.Type contextType) [0x00000] in <222b71ed74914d6ebbdbc2b580446023>:0 
    at System.Data.Entity.Migrations.DbMigrator..ctor (System.Data.Entity.Migrations.DbMigrationsConfiguration configuration, System.Data.Entity.DbContext usersContext, System.Data.Entity.Internal.DatabaseExistenceState existenceState, System.Boolean calledByCreateDatabase) [0x0006e] in <222b71ed74914d6ebbdbc2b580446023>:0 
    at System.Data.Entity.Migrations.DbMigrator..ctor (System.Data.Entity.Migrations.DbMigrationsConfiguration configuration) [0x00000] in <222b71ed74914d6ebbdbc2b580446023>:0 
    at System.Data.Entity.Migrations.Design.MigrationScaffolder..ctor (System.Data.Entity.Migrations.DbMigrationsConfiguration migrationsConfiguration) [0x00012] in <222b71ed74914d6ebbdbc2b580446023>:0 
    at System.Data.Entity.Migrations.Design.ToolingFacade+ScaffoldRunner.RunCore () [0x00006] in <222b71ed74914d6ebbdbc2b580446023>:0 
    at System.Data.Entity.Migrations.Design.ToolingFacade+BaseRunner.Run () [0x00000] in <222b71ed74914d6ebbdbc2b580446023>:0
”
ExceptionPath = Root
ClassName = JetBrains.Util.LoggerException
HResult = COR_E_APPLICATION=80131600
StackTraceString = “
  at JetBrains.Util.ILoggerEx.LogMessage (JetBrains.Util.ILogger this, JetBrains.Diagnostics.LoggingLevel level, System.String message) [0x00000] in <37ed49b15eea41448b14c541f9d5975f>:0 
    at JetBrains.Util.ILoggerEx.Error (JetBrains.Util.ILogger this, System.String message) [0x00000] in <37ed49b15eea41448b14c541f9d5975f>:0 
    at JetBrains.EntityFramework.Runner620.CommandRunnerBase`2[TIn,TOut].JetBrains.EntityFramework.Runner620.ICommandRunner<TIn>.Run (TIn command) [0x00000] in <f05235a6a61b4a789b03405b09b6d17a>:0 
    at System.Reflection.RuntimeMethodInfo.InternalInvoke (System.Reflection.RuntimeMethodInfo , System.Object , System.Object[] , System.Exception& ) [0x00000] in <b814b509d4ad406fb40c6c93e38929e7>:0 
    at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <b814b509d4ad406fb40c6c93e38929e7>:0 
    at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <b814b509d4ad406fb40c6c93e38929e7>:0 
    at JetBrains.EntityFramework.Runner620.EntityFrameworkRunnerProgram.Main (System.String[] args) [0x00000] in <f05235a6a61b4a789b03405b09b6d17a>:0
”

11:42:17.753 |E| EntityFrameworkRunnerProgram  | :1                 | Exception has been thrown by the target of an invocation. Invalid value for key 'attachdbfilename'.

--- EXCEPTION #1/3 [ToolingException]
Message = “Invalid value for key 'attachdbfilename'.”
ExceptionPath = Root.InnerException.InnerException
ClassName = System.Data.Entity.Migrations.Design.ToolingException
HResult = COR_E_EXCEPTION=80131500
Source = EntityFramework
SafeSerializationManager.m_serializedStates.#0 = System.Data.Entity.Migrations.Design.ToolingException+ToolingExceptionState
CLR_SafeSerializationManager_RealType.Data = System.Data.Entity.Migrations.Design.ToolingException
CLR_SafeSerializationManager_RealType.UnityType = 4
CLR_SafeSerializationManager_RealType.AssemblyName = “EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089”
StackTraceString = “
  at System.Data.Entity.Migrations.Design.ToolingFacade.Run (System.Data.Entity.Migrations.Design.ToolingFacade+BaseRunner runner) [0x00097] in <222b71ed74914d6ebbdbc2b580446023>:0 
    at System.Data.Entity.Migrations.Design.ToolingFacade.ScaffoldInitialCreate (System.String language, System.String rootNamespace) [0x0001b] in <222b71ed74914d6ebbdbc2b580446023>:0 
    at JetBrains.EntityFramework.Runner620.ScaffoldInitialMigrationRunner.DoRun (JetBrains.EntityFramework.Features.Commands.EnableMigrationsCommand command) [0x00011] in <f05235a6a61b4a789b03405b09b6d17a>:0 
    at JetBrains.EntityFramework.Runner620.CommandRunnerBase`2[TIn,TOut].JetBrains.EntityFramework.Runner620.ICommandRunner<TIn>.Run (TIn command) [0x001af] in <f05235a6a61b4a789b03405b09b6d17a>:0 
    at (wrapper managed-to-native) System.Reflection.RuntimeMethodInfo.InternalInvoke(System.Reflection.RuntimeMethodInfo,object,object[],System.Exception&)
    at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x0006a] in <b814b509d4ad406fb40c6c93e38929e7>:0
”

Я не нашел решения, чтобы справиться с этой ошибкой enter image description here

если понадобятся подробности, я постараюсь получить их для вас

...