Skip to content

Update environment documentation and command example - #38003

Open
guardrex wants to merge 12 commits into
mainfrom
guardrex-patch-4
Open

guardrex wants to merge 12 commits into
mainfrom
guardrex-patch-4

Conversation

@guardrex

@guardrex guardrex commented Oct 24, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #38002

Thanks @Albirair! 🚀

In addition to fixing the broken dotnet run command, I'd like to see if we can add a summary table of the scenarios and environment variables.

Genevieve ... I went back-and-forth with Copilot on the table content, and I we came to agreement on the wording 😄. We can get more 👀 on this if you think it wise.

NOTE: The text updates (the table and remarks) are versioned for .NET 7 or later.


Internal previews

File Preview link
aspnetcore/fundamentals/environments.md Learn preview

Build report

@guardrex
guardrex requested a balanced review from Copilot October 24, 2026 11:00
@guardrex guardrex self-assigned this Oct 24, 2026

This comment was marked as resolved.

guardrex and others added 3 commits October 24, 2026 07:11
Clarify environment variable precedence for different app types.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

This comment was marked as resolved.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

This comment was marked as outdated.

This comment was marked as resolved.

This comment was marked as resolved.

This comment was marked as resolved.

This comment was marked as outdated.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The focused documentation changes address the reported command error and clarify environment selection without unresolved issues.

No open issues 🎉

Review effort: Balanced

@guardrex
guardrex requested a review from gewarren October 29, 2026 15:10
* `ASPNETCORE_ENVIRONMENT`

When using <xref:Microsoft.AspNetCore.Builder.WebApplication>, the `DOTNET_ENVIRONMENT` value take precedence over `ASPNETCORE_ENVIRONMENT`. When using <xref:Microsoft.AspNetCore.WebHost>, `ASPNETCORE_ENVIRONMENT` takes precedence.
App type | Recommended variable | Behavior and precedence

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this the standard table format in this repo (i.e. without opening/closing bars)?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here's the history ...

Everyone was on-board with the same full format (pipes on both ends) in two formats:

  • Pipes on both ends, all space collapsed.

    | Heading 1 | Heading 2 |
    | --- | --- |
    | H1C1 | H2C1 |
    | H1C2 | H2C2 |
    
  • Space in the columns so that they fully covered the text.

    | Heading 1 | Heading 2 |
    | --------- | --------- |
    | H1C1      | H2C1      |
    | H1C2      | H2C2      |
    

    ... and expanded if there are wide cells ...

    | Heading 1 | Heading 2       |
    | --------- | --------------- |
    | H1C1      | H2C1xxxxxxxxxxx |
    | H1C2      | H2C2            |
    

Those were the accepted general formats.

Over the years, it went sideways 😵. Community authors and content managers started drifting away from that, including messy tables with odd spacing, odd numbers of dashes, no leading/trailing space around the dashes, missing pipes on the ends. The repo is a bit of a mess at this point.

In the Blazor node, which I had total control over, everything is much more stable and conforms to the convention of those original formats.

However, over the last year or two, I've been favoring the first type with no outside pipes ...

Heading 1 | Heading 2
--- | ---
H1C1 | H2C1
H1C2 | H2C2

That's the format that I've been massaging into the Blazor node into, and I'd like eventually to have all of the tables in the Blazor node on that.

Let me know if you want to do something different everywhere. I like conventions and standards, and I'll adopt whatever layout you want to go with.

BTW ... quick FYI ... I'm out of time this week and just about to go OOF ... including a dinner tonight and a costume 👻 Halloween Party! 🎃 I'll be offline for most of the rest of the day. If I see a ping on my phone tho for a review approval, I'll put that in from the road to help you get things done if you're still working later today.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that generally Markdown tables are expected to have the opening/closing pipes, and the tools that format tables automatically always add them too. But I don't feel strongly about changing all the existing tables.

https://review.learn.microsoft.com/en-us/help/platform/markdown-reference?branch=main#tables

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not required, but I'm happy to add them back as I go and use them going forward.

I liked killing them to save the characters on display and see as much table cell content as possible with the least clutter possible.

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

Labels

None yet

3 participants