-
Notifications
You must be signed in to change notification settings - Fork 10k
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
[Static Assets] Improve development experience #57671
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MackinnonBuck
approved these changes
Sep 3, 2024
/backport to release/9.0 |
Started backporting to release/9.0: https://github.com/dotnet/aspnetcore/actions/runs/10776920258 |
11 tasks
mkArtakMSFT
pushed a commit
that referenced
this pull request
Sep 10, 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? - [X] 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 - [X] 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 - [X] Manual (required) - [ ] Automated ## Packaging changes reviewed? - [ ] Yes - [ ] No - [X] N/A ---- ## When servicing release/2.1 - [ ] Make necessary changes in eng/PatchConfig.props
1 task
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes https://github.com/dotnet/AspNetCore-ManualTests/issues/3007, #57449
The endpoint manifest exposes the manifest type (Build | Publish) dotnet/sdk#43167 and we read it here to key off certain things: