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

[release/9.0] [Static Assets] Improve development experience #57764

Merged
merged 1 commit into from
Sep 10, 2024

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Sep 9, 2024

Backport of #57671 to release/9.0

/cc @javiercn

[Static Assets] Improve development experience

Fixes an issue when running a published app on Development and provides a better error when static web assets are not enabled during development

Description

  • Addresses two issues that we found during development:
    • When the user publishes the app and runs against the Development environment:
      • Some logic that is pivoted on based on the Environment and is only used during development (Build as opposed to Publish) interferes with the output and causes issues on the running app.
    • When the app runs during development, but Static Web Assets are not enabled for some reason:
      • The app isn't able to find some static files and errors out.
      • The fix improves the experience by detecting this situation and logging a warning on the console with instructions on how to enable static web assets explicitly.

Customer Impact

  • Running in Docker 'Regular Mode' in Visual Studio breaks as the app runs the published output with Development environment.
  • Running the app during development with a custom environment or without a launch profile will cause some static files to not be found.

Regression?

  • Yes
  • No

8.0 and earlier, the published output was runnable in Development environment. For example in Docker containers regular mode (how the issue was found).

Risk

  • High
  • Medium
  • Low

The changes uses information that we produce during the build (Build and Publish) to differentiate between the two scenarios and disable the development functionality for the published output and provide a better error message when static web assets are not enabled during development.

Verification

  • Manual (required)
  • Automated

Packaging changes reviewed?

  • Yes
  • No
  • N/A

When servicing release/2.1

  • Make necessary changes in eng/PatchConfig.props

@dotnet-issue-labeler dotnet-issue-labeler bot added the needs-area-label Used by the dotnet-issue-labeler to label those issues which couldn't be triaged automatically label Sep 9, 2024
@javiercn javiercn self-requested a review September 9, 2024 16:21
@javiercn javiercn added the Servicing-consider Shiproom approval is required for the issue label Sep 9, 2024
@mkArtakMSFT mkArtakMSFT added area-ui-rendering Includes: MVC Views/Pages, Razor Views/Pages and removed needs-area-label Used by the dotnet-issue-labeler to label those issues which couldn't be triaged automatically labels Sep 10, 2024
@leecow leecow added Servicing-approved Shiproom has approved the issue and removed Servicing-consider Shiproom approval is required for the issue labels Sep 10, 2024
@mkArtakMSFT mkArtakMSFT added * NO MERGE * Do not merge this PR as long as this label is present. and removed * NO MERGE * Do not merge this PR as long as this label is present. labels Sep 10, 2024
@mkArtakMSFT mkArtakMSFT merged commit fc4f881 into release/9.0 Sep 10, 2024
25 checks passed
@mkArtakMSFT mkArtakMSFT deleted the backport/pr-57671-to-release/9.0 branch September 10, 2024 19:27
@dotnet-policy-service dotnet-policy-service bot added this to the 9.0-rc2 milestone Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-ui-rendering Includes: MVC Views/Pages, Razor Views/Pages Servicing-approved Shiproom has approved the issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants