【发布时间】:2016-09-12 14:04:24
【问题描述】:
但是命令 Add-Migration MyFirstMigration 不起作用。 你知道为什么
PM> Add-Migration MyFirstMigration
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidOperationException: **The process does not contain the identity of the package (Exception from HRESULT: 0x80073D54)**
at Windows.Storage.ApplicationData.get_Current()
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Microsoft.Data.Sqlite.SqliteConnection.GetApplicationData()
at Microsoft.Data.Sqlite.SqliteConnection.AdjustForRelativeDirectory(String path)
at Microsoft.Data.Sqlite.SqliteConnection.Open()
at Microsoft.Data.Entity.Storage.RelationalConnection.Open()
at Microsoft.Data.Entity.Storage.Internal.SqliteRelationalConnection.Open()
at Microsoft.Data.Entity.Storage.Internal.RelationalCommand.Execute[T](IRelationalConnection connection, Func`3 action, String executeMethod, Boolean openConnection, Boolean closeConnection)
at Microsoft.Data.Entity.Storage.Internal.RelationalCommand.ExecuteScalar(IRelationalConnection connection, Boolean manageConnection)
at Microsoft.Data.Entity.Storage.Internal.SqliteDatabaseCreator.HasTables()
at Microsoft.Data.Entity.Storage.RelationalDatabaseCreator.EnsureCreated()
at Microsoft.Data.Entity.Infrastructure.DatabaseFacade.EnsureCreated()
【问题讨论】:
标签: c# entity-framework migration uwp