Open mmarinchenko opened 3 years ago
Thanks for the update. Can you check if the files are actually downloaded when opening the app?
In Release
mode they are not requested from the server:
And as I can see are not served: https://github.com/unoplatform/Uno.Wasm.Bootstrap/blob/main/src/Uno.Wasm.Bootstrap.Cli/Server/Startup.cs#L109-#L112
GitHub
A simple nuget package to run C# code in a WASM-compatible browser - unoplatform/Uno.Wasm.Bootstrap
Ok, so they are only copied to the dist folder. It could be related to how the linker is configured, good to know. Thanks!
I guess the following files should also not be copied to dist
:
7.0.x introduced more unnecessary files in the dist directory. We have to add the following task to Wasm head to get around this:
<Target Name="DeleteUnnecessaryFiles" AfterTargets="Publish" Condition="'$(Configuration)'=='Release'">
<ItemGroup>
<_FilesToDelete Remove="@(_FilesToDelete)" />
<_FilesToDelete Include="$(PublishDir)\**\obj\*.*" />
<_FilesToDelete Include="$(PublishDir)\**\emcc-*" />
<_FilesToDelete Include="$(PublishDir)\**\package.json" />
<_FilesToDelete Include="$(PublishDir)\**\runtime.js" />
<_FilesToDelete Include="$(PublishDir)\**\*.c" />
<_FilesToDelete Include="$(PublishDir)\**\*.h" />
<_FilesToDelete Include="$(PublishDir)\**\*.lib.js" />
<_FilesToDelete Include="$(PublishDir)\**\*.pdb" />
<_FilesToDelete Include="$(PublishDir)\**\*.runtime.json" />
<_FilesToDelete Include="$(PublishDir)\**\*.symbols" />
<_FilesToDelete Include="$(PublishDir)\**\*.ts" />
<_FilesToDelete Include="$(PublishDir)\**\*.txt" />
</ItemGroup>
<Delete Files="@(_FilesToDelete)">
<Output TaskParameter="DeletedFiles" ItemName="_DeletedFiles" />
</Delete>
<Message Importance="high" Condition="'@(_DeletedFiles->Count())'<='0'" Text="$(PublishDir): no unnecessary files deleted." />
<Message Importance="high" Condition="'@(_DeletedFiles->Count())'>'0'" Text="$(PublishDir): unnecessary files deleted (@(_DeletedFiles->'%(FileName)%(Extension)'))." />
</Target>
Output when publishing:
<...>\WasmHead\obj\Release\net6.0\PubTmp\Out\: unnecessary files deleted (uno-bootstrap.d.ts;uno-bootstrap.js;emcc-compile.rsp;emcc-default.rsp;emcc-link.rsp;emcc-props.json;package.json;runtime.js;corebindings.c;driver.c;pinvoke.c;gc-common.h;pinvoke.h;wasm-config.h;pal_random.lib.js;WasmHead.staticwebassets.runtime.json;dotnet.js.symbols;dotnet-legacy.d.ts;dotnet.d.ts;uno-assets.txt).
Which means the following list:
Some changes for this have been introduced in 8.0-dev builds regarding this particular issue.
This issue is spin-off of #393.
Steps to reproduce (PowerShell)
The
Uno.Wasm.TimezoneData.*
files have different (old)LastWriteTime
- I guess this is important thing. Other files inpackage_*
folder always have current time.Try to ensure that we really don't want
*.pdb
files in output directory:No luck.
Now if we update the project:
We get much more
*.pdb
files (but not as much as withDebug
build):