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 |
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 |
|
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. |
|
Hi, |
|
@rasmus Just to understand more clearly: is the fact that |
|
Hi @rasmus, did you see my question above? I'd be happy to help! |
|
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 |
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
IBootstrapperinstance from the service provider and callStartAsyncyourself. This is obviously something that needs to be integrated in the framework.