dotnet / dotnet/aspnetcore

Ordering of Configuration and Startup Classes intellisense ML

Open
#36,192 2 comments 0 reactions 0 assignees View on GitHub
area-networking enhancement
Dominant language
C#
Stars
38.4k
Forks
10.9k
Avg merge
2d 10h
Merged PRs (30d)
281

Description

### Is your feature request related to a problem? Please describe.
Even as seasoned developer often at times we can get lost in code and get confused on the ordering of startup configs and app using.

### Describe the solution you'd like
I would think a way that ML Intellense could be updated to show some kind of ordering system to certain use cases for example If the user adds in EF Core Authentication

It would alert the user that they require app.UsetAuthhorization() but it should be at a specfic order in the config section

### Additional context
For Example here

app.UseNToastNotify();

app.UseSession();
app.UseHttpsRedirection();
app.UseStaticFiles();
app.UseRouting();
app.UseAuthorization(); ->> wrong order
app.UseCustomizedStaticFiles(env);

app.UseAuthentication();
app.UseAuthorization();-->correct order

In much the same way that when creating auto properties using tab the IntelliSense would suggest the next action if something was installed like UseAuthorization is it possible that the ML and IntelliSense teams could look at some kind of ordering suggestions, would help programmers not loose hours over some misplaced configuration steps.

For Example we could have some kind of of placement arrow come up that would be to the left of the app. that would suggest the first instance is in the wrong order?

I would call it configuration ordering dependencies or something like that.,

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.