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

Native AOT with .NET 8 #1095

Open
SbiCA opened this issue Jun 6, 2023 · 4 comments
Open

Native AOT with .NET 8 #1095

SbiCA opened this issue Jun 6, 2023 · 4 comments
Assignees
Labels

Comments

@SbiCA
Copy link

SbiCA commented Jun 6, 2023

Hi @mookid8000

Did you already try out using rebus with native AOT in .NET 8?

Do you already have an idea what's going to break? I guess the Router and Handler discovery might be affected?

Cheers

For people interested in it see https://youtu.be/km9CnGYBafI

@mookid8000
Copy link
Member

I haven't tried it yet 🙂 but if I understand things correctly, it's not reflection as such that causes things to break, it's more when reflection is used to load types that the AOT analyzer cannot predict are going to be loaded... and I can't recall any situations where Rebus does that.

E.g. I would assume that the AOT system will know that your handler is needed, because you did something like this:

services.AddRebusHandler<YourMessageHandler>();

so that type and its dependencies should be kept. But I might be wrong 😅 it would be fun to try though.

@mookid8000 mookid8000 self-assigned this Jun 13, 2023
@dguisinger
Copy link

@SbiCA Did you ever have a chance to try out Rebus with AOT? Was there a determination of whether or not it works?

@SbiCA
Copy link
Author

SbiCA commented Jun 27, 2024

@dguisinger nope I'm afraid not so if you made first experience I'd also be interested 😅

@dguisinger
Copy link

@SbiCA hah, I've recently ripped out AutoMapper and MediatR because they didn't work with AoT and the project owner doesn't want to put time into making it work. I then spent time looking into Mass Transit and then realized it also doesn't work with AoT and their project owner has a similar attitude. I've pretty much given up on non-Microsoft frameworks at this point and don't want to waste more time evaluating things just to find they don't work with modern framework runtime options. Kind of disappointed MSFT just said they are holding back their event framework due to complaints... I bet it would have worked just fine out of the box.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants