Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows 10 UWP with Sqlite: remove-migration error #4812

Closed
patrickadamek opened this issue Mar 16, 2016 · 4 comments
Closed

Windows 10 UWP with Sqlite: remove-migration error #4812

patrickadamek opened this issue Mar 16, 2016 · 4 comments
Assignees
Labels
closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-bug
Milestone

Comments

@patrickadamek
Copy link

Trying to remove a migration via remove-migration in an UWP App results in the following error:

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidOperationException: Der Prozess besitzt keine Paketidentität. (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.Migrations.HistoryRepository.Exists()
   at Microsoft.Data.Entity.Migrations.HistoryRepository.GetAppliedMigrations()
   at Microsoft.Data.Entity.Migrations.Design.MigrationsScaffolder.RemoveMigration(String projectDir, String rootNamespace)
   at Microsoft.Data.Entity.Design.MigrationsOperations.RemoveMigration(String contextType)
   at Microsoft.Data.Entity.Design.OperationExecutor.<RemoveMigrationImpl>d__13.MoveNext()
   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
   at Microsoft.Data.Entity.Design.OperationExecutor.OperationBase.<>c__DisplayClass4_0`1.<Execute>b__0()
   at Microsoft.Data.Entity.Design.OperationExecutor.OperationBase.Execute(Action action)
Exception has been thrown by the target of an invocation.

This is true if the database path / connection string is specified as connection string or dbconnection. Also it does not matter if the path is relative or absolute.

@bricelam
Copy link
Contributor

We should skip checking the database on UWP projects and just always issue a warning about rewriting history instead.

@rowanmiller
Copy link
Contributor

@natemcmaster did we just add the -Force option, or do we actually " skip checking the database on UWP projects and just always issue a warning about rewriting history instead."

@natemcmaster
Copy link
Contributor

We added -Force that defaults to true on UWP.

$forceRemove = $Force -or (IsUwpProject $dteProject)

@rowanmiller
Copy link
Contributor

Ah, I missed that part. Thanks 😄

@ajcvickers ajcvickers added the closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. label Oct 15, 2022
@ajcvickers ajcvickers modified the milestones: 1.0.0-rc2, 1.0.0 Oct 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-bug
Projects
None yet
Development

No branches or pull requests

5 participants