Closed xandraele closed 1 year ago
Hi @xandraele, the project is mandatory in such a case. Do you maybe have custom migrations?
Hi, Andrii. Before last update all worked like a charm. In fact, we use our own base class for migrations, but previous version of plugin worked.
From: Andrii Rublov @.> Sent: Wednesday, June 14, 2023 5:24:30 PM To: seclerp/rider-efcore @.> Cc: xandraele @.>; Mention @.> Subject: Re: [seclerp/rider-efcore] Exception if "Add Migration" menu item in use (Issue #170)
Hi @xandraelehttps://github.com/xandraele, the project is mandatory in such a case. Do you maybe have custom migrations?
— Reply to this email directly, view it on GitHubhttps://github.com/seclerp/rider-efcore/issues/170#issuecomment-1591324604, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACTAXDDLUIEWVWL2SJXLRE3XLHCR5ANCNFSM6AAAAAAZGM4FGY. You are receiving this because you were mentioned.Message ID: @.***>
Please be more specific. Which version of the plugin worked fine? 231.1.3
? On the same Rider version or not?
And also please share your custom migration class structure. In fact, we don't support such a setup so it shouldn't work before (even if it was working). But we are open to enabling such kind of things.
This issue is stale because it has been open 14 days with no requested info. The issue will be automatically closed in 1 day.
This issue was closed because it has been stalled for 1 day with no activity.
com.jetbrains.rd.util.reactive.RdFault: Specified cast is not valid., reason: System.InvalidCastException: Specified cast is not valid. at JetBrains.ReSharper.Psi.ConstantValue.get_StringValue() at Rider.Plugins.EfCore.Migrations.MigrationsProvider.TryGetMigrationInfo(IClass class, MigrationInfo& migrationInfo) in /home/runner/work/rider-efcore/rider-efcore/src/dotnet/Rider.Plugins.EfCore/Migrations/MigrationsProvider.cs:line 57 at Rider.Plugins.EfCore.Extensions.LinqExtensions.TrySelect[T1,T2](IEnumerableb__0(Lifetime lifetime, TReq req)
at JetBrains.Rd.Tasks.RdCall`2.OnWireReceived(UnsafeReader reader)
at com.jetbrains.rd.framework.RdTaskResult$Companion.read(TaskInterfaces.kt:30)
at com.jetbrains.rd.framework.impl.CallSiteWiredRdTask.onWireReceived(RdTask.kt:106)
at com.jetbrains.rd.framework.MessageBroker$invoke$2$2.invoke(MessageBroker.kt:57)
at com.jetbrains.rd.framework.MessageBroker$invoke$2$2.invoke(MessageBroker.kt:56)
at com.jetbrains.rd.framework.impl.ProtocolContexts.readMessageContextAndInvoke(ProtocolContexts.kt:148)
at com.jetbrains.rd.framework.MessageBroker$invoke$2.invoke(MessageBroker.kt:56)
at com.jetbrains.rd.framework.MessageBroker$invoke$2.invoke(MessageBroker.kt:54)
at com.jetbrains.rdclient.protocol.RdDispatcher.flushAll(RdDispatcher.kt:101)
at com.jetbrains.rdclient.protocol.RdDispatcher.flushAllRunnable$lambda$0(RdDispatcher.kt:25)
at com.intellij.openapi.application.TransactionGuardImpl.runWithWritingAllowed(TransactionGuardImpl.java:209)
at com.intellij.openapi.application.TransactionGuardImpl.access$100(TransactionGuardImpl.java:21)
at com.intellij.openapi.application.TransactionGuardImpl$1.run(TransactionGuardImpl.java:191)
at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:831)
at com.intellij.openapi.application.impl.ApplicationImpl$3.run(ApplicationImpl.java:456)
at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:79)
at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:122)
at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:41)
at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:788)
at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:739)
at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:731)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:758)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.kt:667)
at com.intellij.ide.IdeEventQueue._dispatchEvent$lambda$7(IdeEventQueue.kt:571)
at com.intellij.openapi.application.impl.ApplicationImpl.withoutImplicitRead(ApplicationImpl.java:1446)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.kt:571)
at com.intellij.ide.IdeEventQueue.access$_dispatchEvent(IdeEventQueue.kt:68)
at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:349)
at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:348)
at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:787)
at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:348)
at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:343)
at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$1(IdeEventQueue.kt:995)
at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:113)
at com.intellij.ide.IdeEventQueueKt.performActivity(IdeEventQueue.kt:995)
at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$4(IdeEventQueue.kt:343)
at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:831)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.kt:385)
at com.intellij.openapi.progress.impl.PlatformTaskSupportKt.pumpEventsForHierarchy(PlatformTaskSupport.kt:341)
at com.intellij.openapi.progress.impl.PlatformTaskSupportKt.access$pumpEventsForHierarchy(PlatformTaskSupport.kt:1)
at com.intellij.openapi.progress.impl.PlatformTaskSupport$runBlockingModalInternal$2$1.invoke(PlatformTaskSupport.kt:139)
at com.intellij.openapi.progress.impl.PlatformTaskSupport$runBlockingModalInternal$2$1.invoke(PlatformTaskSupport.kt:121)
at com.intellij.openapi.application.impl.ModalityKt.inModalContext(modality.kt:36)
at com.intellij.openapi.progress.impl.PlatformTaskSupport.runBlockingModalInternal(PlatformTaskSupport.kt:121)
at com.intellij.openapi.progress.impl.PlatformTaskSupport.access$runBlockingModalInternal(PlatformTaskSupport.kt:41)
at com.intellij.openapi.progress.impl.PlatformTaskSupport$runBlockingModalInternal$1.invoke(PlatformTaskSupport.kt:113)
at com.intellij.openapi.progress.impl.PlatformTaskSupport$runBlockingModalInternal$1.invoke(PlatformTaskSupport.kt:110)
at com.intellij.openapi.progress.CancellationKt$ensureCurrentJob$1.invoke(cancellation.kt:68)
at com.intellij.openapi.progress.CancellationKt.withCurrentJob$lambda$0(cancellation.kt:17)
at com.intellij.openapi.progress.Cancellation.withCurrentJob(Cancellation.java:60)
at com.intellij.openapi.progress.CancellationKt.withCurrentJob(cancellation.kt:17)
at com.intellij.openapi.progress.CancellationKt.executeWithJobAndCompleteIt(cancellation.kt:126)
at com.intellij.openapi.progress.CancellationKt.ensureCurrentJob(cancellation.kt:67)
at com.intellij.openapi.progress.CancellationKt.ensureCurrentJobAllowingOrphan(cancellation.kt:51)
at com.intellij.openapi.progress.impl.PlatformTaskSupport.runBlockingModalInternal(PlatformTaskSupport.kt:110)
at com.intellij.openapi.progress.TasksKt.runBlockingModalWithRawProgressReporter(tasks.kt:263)
at com.jetbrains.rider.services.RiderGlobalProgressHostKt.runWithModalProgress(RiderGlobalProgressHost.kt:125)
at com.jetbrains.rider.services.RiderGlobalProgressHostKt$runWithModalProgressReportedToBackend$1.invoke(RiderGlobalProgressHost.kt:149)
at com.jetbrains.rider.services.RiderGlobalProgressHostKt$runWithModalProgressReportedToBackend$1.invoke(RiderGlobalProgressHost.kt:148)
at com.jetbrains.rider.services.RiderGlobalProgressHost.runWithSupplyingProgressToBackend$rdclient_dotnet(RiderGlobalProgressHost.kt:73)
at com.jetbrains.rider.services.RiderGlobalProgressHostKt.runWithModalProgressReportedToBackend(RiderGlobalProgressHost.kt:148)
at com.jetbrains.rider.util.idea.ExtensionsKt.runUnderProgress(Extensions.kt:125)
at me.seclerp.rider.plugins.efcore.features.shared.ObservableMigrations$initBinding$1.invoke(ObservableMigrations.kt:22)
at me.seclerp.rider.plugins.efcore.features.shared.ObservableMigrations$initBinding$1.invoke(ObservableMigrations.kt:18)
at me.seclerp.observables.ObservableExKt$bind$1.invoke(ObservableEx.kt:10)
at me.seclerp.observables.ObservableExKt$bind$1.invoke(ObservableEx.kt:9)
at me.seclerp.observables.Event.invoke(Event.kt:17)
at me.seclerp.observables.ObservableProperty$setter$1.invoke(ObservableProperty.kt:22)
at me.seclerp.observables.ObservableProperty$setter$1.invoke(ObservableProperty.kt:18)
at me.seclerp.observables.ObservableProperty.setValue(ObservableProperty.kt:14)
at me.seclerp.observables.ObservableExKt$bind$1.invoke(ObservableEx.kt:10)
at me.seclerp.observables.ObservableExKt$bind$1.invoke(ObservableEx.kt:9)
at me.seclerp.observables.Event.invoke(Event.kt:17)
at me.seclerp.observables.ObservableProperty$setter$1.invoke(ObservableProperty.kt:22)
at me.seclerp.observables.ObservableProperty$setter$1.invoke(ObservableProperty.kt:18)
at me.seclerp.observables.ObservableProperty.setValue(ObservableProperty.kt:14)
at me.seclerp.observables.ObservableExKt$bind$1.invoke(ObservableEx.kt:10)
at me.seclerp.observables.ObservableExKt$bind$1.invoke(ObservableEx.kt:9)
at me.seclerp.observables.Event.invoke(Event.kt:17)
at me.seclerp.observables.ObservableCollection.setValue(ObservableCollection.kt:23)
at me.seclerp.observables.ObservableCollection.setValue(ObservableCollection.kt:3)
at me.seclerp.observables.ObservableExKt$bind$1.invoke(ObservableEx.kt:10)
at me.seclerp.observables.ObservableExKt$bind$1.invoke(ObservableEx.kt:9)
at me.seclerp.observables.Event.invoke(Event.kt:17)
at me.seclerp.observables.ObservableCollection.setValue(ObservableCollection.kt:23)
at me.seclerp.observables.ObservableCollection.setValue(ObservableCollection.kt:3)
at me.seclerp.observables.ObservableExKt$bindSafe$1.invoke(ObservableEx.kt:17)
at me.seclerp.observables.ObservableExKt$bindSafe$1.invoke(ObservableEx.kt:15)
at me.seclerp.observables.Event.invoke(Event.kt:17)
at me.seclerp.observables.ObservableProperty$setter$1.invoke(ObservableProperty.kt:22)
at me.seclerp.observables.ObservableProperty$setter$1.invoke(ObservableProperty.kt:18)
at me.seclerp.observables.ObservableProperty.setValue(ObservableProperty.kt:14)
at me.seclerp.rider.plugins.efcore.features.shared.dialog.CommonDataContext.initData(CommonDataContext.kt:71)
at me.seclerp.rider.plugins.efcore.features.shared.dialog.CommonDialogWrapper.initData(CommonDialogWrapper.kt:171)
at me.seclerp.rider.plugins.efcore.features.shared.dialog.CommonDialogWrapper.initUi(CommonDialogWrapper.kt:91)
at me.seclerp.rider.plugins.efcore.features.database.update.UpdateDatabaseDialogWrapper.(UpdateDatabaseDialogWrapper.kt:54)
at me.seclerp.rider.plugins.efcore.features.database.update.UpdateDatabaseAction.createDialog(UpdateDatabaseAction.kt:16)
at me.seclerp.rider.plugins.efcore.features.database.update.UpdateDatabaseAction.createDialog(UpdateDatabaseAction.kt:10)
at me.seclerp.rider.plugins.efcore.features.shared.BaseCommandAction.openDialog(BaseCommandAction.kt:68)
at me.seclerp.rider.plugins.efcore.features.shared.BaseCommandAction.access$openDialog(BaseCommandAction.kt:28)
at me.seclerp.rider.plugins.efcore.features.shared.BaseCommandAction$actionPerformed$1.run$lambda$0(BaseCommandAction.kt:49)
at com.intellij.openapi.application.TransactionGuardImpl.runWithWritingAllowed(TransactionGuardImpl.java:209)
at com.intellij.openapi.application.TransactionGuardImpl.access$100(TransactionGuardImpl.java:21)
at com.intellij.openapi.application.TransactionGuardImpl$1.run(TransactionGuardImpl.java:191)
at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:831)
at com.intellij.openapi.application.impl.ApplicationImpl$3.run(ApplicationImpl.java:456)
at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:79)
at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:122)
at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:41)
at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:788)
at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:739)
at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:731)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:758)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.kt:667)
at com.intellij.ide.IdeEventQueue._dispatchEvent$lambda$7(IdeEventQueue.kt:571)
at com.intellij.openapi.application.impl.ApplicationImpl.withoutImplicitRead(ApplicationImpl.java:1446)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.kt:571)
at com.intellij.ide.IdeEventQueue.access$_dispatchEvent(IdeEventQueue.kt:68)
at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:349)
at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:348)
at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:787)
at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:348)
at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:343)
at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$1(IdeEventQueue.kt:995)
at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:105)
at com.intellij.ide.IdeEventQueueKt.performActivity(IdeEventQueue.kt:995)
at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$4(IdeEventQueue.kt:343)
at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:831)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.kt:385)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:207)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:92)
1 enumerable, FuncTry
2 safeMapping)+MoveNext() in /home/runner/work/rider-efcore/rider-efcore/src/dotnet/Rider.Plugins.EfCore/Extensions/LinqExtensions.cs:line 21 at System.Linq.Enumerable.WhereEnumerableIterator1.ToList() at Rider.Plugins.EfCore.Migrations.MigrationsProvider.GetMigrations(IProject project, String dbContextFullName) in /home/runner/work/rider-efcore/rider-efcore/src/dotnet/Rider.Plugins.EfCore/Migrations/MigrationsProvider.cs:line 33 at Rider.Plugins.EfCore.EntityFrameworkCoreHost.GetAvailableMigrations(Lifetime lifetime, MigrationsIdentity identity) in /home/runner/work/rider-efcore/rider-efcore/src/dotnet/Rider.Plugins.EfCore/EntityFrameworkCoreHost.cs:line 203 at JetBrains.Rd.Tasks.RdTaskEx.<>c__DisplayClass9_0
2.Steps to reproduce the behavior:
:warning: It is highly recommended to provide a minimal solution that reproduces your issue.
Expected behavior
Add Migration UI appears
Screenshots
Environment (please complete the following information):