Issue with .NETCore Console app using EventFlow #861
-
We have a pretty big app done using Eventflow. We have 2 ASPNET Core Solutions that work pretty well. We started using EventUpgraders and all works fine. Now we want to add Eventflow to a Windows Service like app. The DI registration is as follows:
The issue that we seem to be getting is that the EventDefinitionSource does not update. For the API parts, I can see 32 Events in there, but for this app I get nothing. When I try to invoke an event on an existing aggregate I get this error:
I tried adding the EventVersion attribute but that doesn't seem to work and it doesn't seem to be backwards compatible :( I tried downgrading the package. to 0.75 |
Beta Was this translation helpful? Give feedback.
Replies: 7 comments
-
+1, we encountered the same problem. Apparently, the If I have some time available in the upcoming days, I might be able to take a look at what the difference is. For now, we've circumvented the problem by adding the following code (based on code found in the EF source) to the Main method of our console applications:
and
and
Not the prettiest solution, but this does make sure the |
Beta Was this translation helpful? Give feedback.
-
@trikk86 did you get it to work? |
Beta Was this translation helpful? Give feedback.
-
I know that the load isn’t optimal. I have been try out a few alternative solutions and I might have one that could work. |
Beta Was this translation helpful? Give feedback.
-
Hi, |
Beta Was this translation helpful? Give feedback.
-
@rasmus Just to understand more clearly: is the fact that |
Beta Was this translation helpful? Give feedback.
-
Hi @rasmus, did you see my question above? I'd be happy to help! |
Beta Was this translation helpful? Give feedback.
-
The problem seems to be that the bootstrapper isn't called. In ASP.NET Core, this happens on startup, using an implementation of You could try retrieving the |
Beta Was this translation helpful? Give feedback.
The problem seems to be that the bootstrapper isn't called. In ASP.NET Core, this happens on startup, using an implementation of
IHostedService
:https://github.com/eventflow/EventFlow/blob/develop/Source/EventFlow.AspNetCore/ServiceProvider/HostedBootstrapper.cs
You could try retrieving the
IBootstrapper
instance from the service provider and callStartAsync
yourself. This is obviously something that needs to be integrated in the framework.