Open dcuccia opened 4 years ago
Check out my suggestion in #14
@sondreb your suggestion work for the sample with vue.js but the problem seems that with WebWindow.Blazor when you publish singlefile you get the wwwroot on the side
On mac this is the result:
So okey i made it work with the sample in the .csproj i added ExcludeFromSingleFile="false" for the wwwroot
<ItemGroup>
<Content Update="wwwroot\**" ExcludeFromSingleFile="false">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
and of course in the Program.cs
var executingDir = Path.GetDirectoryName(System.Reflection.Assembly.GetEntryAssembly().Location);
ComponentsDesktop.Run<Startup>("My Blazor App", Path.Combine(executingDir,"wwwroot/index.html"));
so now when i publishdotnet publish -r osx-x64 -c release /p:PublishSingleFile=true
i get a single executable file and when the content is extracted in the tmp directory i see the wwwroot
Heads up, you need to be on .Net Core 3.1.200-preview-014977 for ExcludeFromSingleFile="false" to work.
Hi! Would it be feasible to make the web assets an embedded resource and extract on first load? Or even mimic a virtual file system to the browser? Interested in .Net Core single-file publishing for copy-paste portable desktop apps.