-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Fix hotreload duplicate assets #52816
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
Merged
Merged
Changes from all commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
7ec7aa6
Fix test assets
maraf 415a97b
Remove dependency on Package for running tests
maraf 1d61ff1
Embed HotReload in WasmSDK
maraf c777ede
Reference embedded HotReload
maraf 366479c
Define SWA for JSInitializer
maraf 43ca45c
Fix content root
maraf 9b27e95
Don't pack the package
maraf 0b699ca
More properties
maraf a5c04c4
Feedback
maraf db3697d
Copy JS part through project reference
maraf 724f7f0
Fix
maraf 438b349
ProjectReference with manual asset copy
maraf d1eb14f
Fix
maraf b0b6233
Fix
maraf d7a29f0
Refactor
maraf c8bb76b
Baselines
maraf 66273f1
Merge branch 'main' into maraf/WasmHotReloadEmbed
maraf 09dcf66
Don't add .nuget as package source
maraf a16649e
Fix double slash
maraf 4b7aa5e
Fix duplicate HotReload asset when hosting multiple Blazor WASM apps
lewing b1f15ee
Merge branch 'main' into fix-hotreload-duplicate-assets
lewing e8ff518
Remove redundant HelixCorrelationPayload entry
lewing 1d4fa10
Update baselines for HotReload AssetMode change and fix merge conflict
lewing bf7276c
Fix duplicate asset error with smart deduplication
lewing afd0106
Remove AssetMode=CurrentProject and update baselines
lewing 6dd965c
Fix HotReload duplicate assets by copying to intermediate folder
lewing 01ee552
Fix HotReload duplicate assets by copying to intermediate folder
lewing 5aec5c8
Restore ArtifactsShippingPackages Helix payload for deduplication test
lewing 75d9e18
Address PR review feedback
lewing 8adbe75
Fix ProjectReference to HotReload.WebAssembly.Browser for net472 comp…
lewing 672ee94
Fix SDK layout: restore AdditionalContent glob and pin HotReload to n…
lewing File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
15 changes: 4 additions & 11 deletions
15
.../HotReloadAgent.WebAssembly.Browser/Microsoft.DotNet.HotReload.WebAssembly.Browser.csproj
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,26 +1,19 @@ | ||
| <Project Sdk="Microsoft.NET.Sdk.Razor"> | ||
| <Project Sdk="Microsoft.NET.Sdk"> | ||
|
|
||
| <PropertyGroup> | ||
| <TargetFramework>$(SdkTargetFramework)</TargetFramework> | ||
| <TargetFramework>net10.0</TargetFramework> | ||
| <GenerateDocumentationFile>false</GenerateDocumentationFile> | ||
| <GenerateDependencyFile>false</GenerateDependencyFile> | ||
| <LangVersion>preview</LangVersion> | ||
| <AllowUnsafeBlocks>true</AllowUnsafeBlocks> | ||
|
|
||
| <!-- NuGet --> | ||
| <IsPackable>true</IsPackable> | ||
| <IsShipping>true</IsShipping> | ||
| <IsShippingPackage>true</IsShippingPackage> | ||
| <PackageId>Microsoft.DotNet.HotReload.WebAssembly.Browser</PackageId> | ||
| <Description>HotReload package for WebAssembly</Description> | ||
| <!-- Remove once https://github.com/NuGet/Home/issues/8583 is fixed --> | ||
| <NoWarn>$(NoWarn);NU5128</NoWarn> | ||
| </PropertyGroup> | ||
|
|
||
| <Import Project="..\HotReloadAgent\Microsoft.DotNet.HotReload.Agent.projitems" Label="Shared" /> | ||
| <Import Project="..\HotReloadAgent.Data\Microsoft.DotNet.HotReload.Agent.Data.projitems" Label="Shared" /> | ||
|
|
||
| <ItemGroup> | ||
| <Content Include="wwwroot\**\*.*" CopyToOutputDirectory="PreserveNewest" /> | ||
| <InternalsVisibleTo Include="DynamicProxyGenAssembly2" Key="$(MoqPublicKey)" /> | ||
| </ItemGroup> | ||
|
|
||
| </Project> |
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this have
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>?Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You'd also want to avoid flowing the current project TFM to the target project like so:
If you also set
you should be able to remove
<AdditionalContent Include="$(ArtifactsBinDir)\Microsoft.DotNet.HotReload.WebAssembly.Browser\$(Configuration)\**\*.*">below.The ProjectReference should create this item.
See https://github.com/dotnet/sdk/blob/main/src/BuiltInTools/Watch/RuntimeDependencies.props#L5 for an example.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The build is failing because of this: