-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[wasm] Embed HotReload in WebAssembly SDK #52710
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
base: main
Are you sure you want to change the base?
Conversation
| <Target Name="_ImplicitlyReferenceHotReload" BeforeTargets="ResolveProjectStaticWebAssets" AfterTargets="ResolveStaticWebAssetsConfiguration" Condition="'$(_WasmEnableHotReload)' == 'true'"> | ||
| <PropertyGroup> | ||
| <_WasmHotReloadRoot>$([MSBuild]::NormalizeDirectory($(MSBuildThisFileDirectory), '..', 'hotreload'))</_WasmHotReloadRoot> | ||
| <_WasmHotReloadDllPath Condition="$([MSBuild]::VersionGreaterThanOrEquals('$(TargetFrameworkVersion)', '10.0'))">net10.0</_WasmHotReloadDllPath> |
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.
@tmat Do you prefer to multi-target the dll or pin it to .NET 10?
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.
Let's pin to .NET 10 until we need runtime features that need higher version. It's simpler and reduces SDK size.
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.
Also, let's target release/10.0.3xx branch instead of main.
| <!-- NuGet --> | ||
| <IsPackable>true</IsPackable> | ||
| <IsShipping>true</IsShipping> | ||
| <IsShippingPackage>true</IsShippingPackage> |
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.
lines 14-17 shouldn't needed anymore.
| @@ -47,6 +47,14 @@ | |||
| <Pack>true</Pack> | |||
| <PackagePath>Sdk</PackagePath> | |||
| </AdditionalContent> | |||
| <AdditionalContent Include="$(ArtifactsBinDir)\Microsoft.DotNet.HotReload.WebAssembly.Browser\$(Configuration)\**\*.*"> | |||
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.
Shouldn't this come from a project reference? Otherwise, the build graph is not going to have the dependency edge and build may fail depending on the order in which the projects are built.
Replace a PackageReference with content shipped inside of the SDK.
It requires to manually reference the dll and define a StaticWebAsset for JSInitializer.
Fixes #49877
Fixes #52686
Fixes dotnet/aspnetcore#65261