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

Support for WebApplicationBuilder #2424

Open
wobbet opened this issue Jul 12, 2024 · 0 comments
Open

Support for WebApplicationBuilder #2424

wobbet opened this issue Jul 12, 2024 · 0 comments

Comments

@wobbet
Copy link

wobbet commented Jul 12, 2024

I am running a .NET Core 8 minimal Web API application and it has slightly odd behavior.

I am using

builder.Services.AddHangfire(config => config { ... });
builder.Services.AddHangfireServer((opts) => { ... });

Followed later by...

App = builder.Build();
App.UseHangfireDashboard();

After the call to App.Run() my Configure method is called again. Fortunately the calls to AddHangfire and AddHangfireServer don't do anything nasty and all is good. But still.

After doing some debugging it looks like this is caused by the call to UseHangfireDashboard. If I'm reading things correctly, this could be avoided if I could use builder.UserHangfireDashboard instead of the call on the application.

The problem is that builder.UseHangfireDashboard requires an IApplicationBuilder but my minimal API app is handed a WebApplicationBuilder which, for some unknown reason (thank you Microsoft), does not implement IApplicationBuilder.

Are there plans to support WebApplicationBuilder? If so, what is the timeline?

If not, is there any objection to my attempting to contribute code for that support? If you're okay with it, what should I know before starting to work on it? Do you have a link for what you expect from contributions?

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

No branches or pull requests

1 participant