Include .Views.dll from single file in .NET Core 3.1 apps #27897
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.
For 5.0, we made a change to exclude .Views.dll from the single file bundle as a reaction
to changes in bundling. However the SDK change also applied to .NET 3.1 apps. This change
limits the exclusion to 5.0 and newer apps.
Adding a test for this is tricky since it requires publishing with a RID which in turn requires a restore as part of the test (something we've actively avoided due to time outs). I was able to manually test this change though.
Fixes #27831
Summary
For 5.0, we made a change to exclude .Views.dll from the single file bundle as a reaction to changes in bundling. However the SDK change also applied to .NET 3.1 apps. This change limits the exclusion to 5.0 and newer apps. While the current change is not breaking in anyway, it was considered an annoyance that we would like to address.
Customer impact
Using a 5.0 SDK results in additional files in 3.1 ASP.NET Core apps with single file publishing.
Regression
Yes
Risk
Low. It's a SDK specific change to limit the change to 5.0 or newer apps. In general, we're not aware of too many customers using single file publishing with 3.1 aspnet core apps so we expect the impact to be very limited.