Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions src/WasmSdk/Sdk/Sdk.targets
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,20 @@ Copyright (c) .NET Foundation. All rights reserved.
<_WasmHotReloadIntermediatePath>$(IntermediateOutputPath)hotreload\</_WasmHotReloadIntermediatePath>
</PropertyGroup>

<!-- Copy the JS module to intermediate folder to avoid duplicate identity when multiple projects reference the same SDK file -->
<!-- Copy the JS module and DLL to intermediate folder to avoid duplicate identity when multiple projects reference the same SDK file -->
<Copy
SourceFiles="$(_WasmHotReloadPath)Microsoft.DotNet.HotReload.WebAssembly.Browser.lib.module.js"
DestinationFolder="$(_WasmHotReloadIntermediatePath)"
SkipUnchangedFiles="true"
Condition="'$(_WasmHotReloadPath)' != ''" />
<Copy
SourceFiles="$(_WasmHotReloadPath)Microsoft.DotNet.HotReload.WebAssembly.Browser.dll"
DestinationFolder="$(_WasmHotReloadIntermediatePath)"
SkipUnchangedFiles="true"
Condition="'$(_WasmHotReloadPath)' != ''" />

<ItemGroup Condition="'$(_WasmHotReloadPath)' != ''">
<ReferenceCopyLocalPaths Include="$(_WasmHotReloadPath)Microsoft.DotNet.HotReload.WebAssembly.Browser.dll">
<ReferenceCopyLocalPaths Include="$(_WasmHotReloadIntermediatePath)Microsoft.DotNet.HotReload.WebAssembly.Browser.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToPublishDirectory>Never</CopyToPublishDirectory>
</ReferenceCopyLocalPaths>
Expand All @@ -47,6 +52,7 @@ Copyright (c) .NET Foundation. All rights reserved.
<OriginalItemSpec>%(Identity)</OriginalItemSpec>
</_WasmHotReloadModule>
<FileWrites Include="$(_WasmHotReloadIntermediatePath)Microsoft.DotNet.HotReload.WebAssembly.Browser.lib.module.js" />
<FileWrites Include="$(_WasmHotReloadIntermediatePath)Microsoft.DotNet.HotReload.WebAssembly.Browser.dll" />
</ItemGroup>

<DefineStaticWebAssets
Expand Down