mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-02-04 05:34:51 +00:00
How to include static files in electron-packager published output folder? #694
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @SheltonAlves on GitHub (Sep 7, 2021).
Originally assigned to: @GregorBiswanger on GitHub.
Hi,
I have used ElectronNET.API(9.31.2) and ElectronNET.CLI(0.0.9) to build my .NET CORE (3.1) application.
For data saving in application I have used sqlite DB file into project and have added "CopyToOutputDirectory = Always" property and it gets copied in output directory when I build the project.
But when I package the project using electron command "electronize build /target win" exe is generated successfully at location "../../bin/Desktop" but does not have sqlite file in published exe output.
How do I include static files in publish output where exe package is built ??
@safoxe commented on GitHub (Jan 10, 2022):
Hi @SheltonAlves,
Do you have "extraResources" section in your electron.manifest,json?
I think this StackOverflow question is related to yours.
@SheltonAlves commented on GitHub (Jan 11, 2022):
Thank you @safoxe for replying.
For adding static files into publish output folder I have used following code in my project csproj file. And during publish it copies the files from
<Target>into output folder.@GregorBiswanger commented on GitHub (Mar 28, 2023):
🎉🚀 New Electron.NET version 23.6.1 released 🚀🎉
With native Electron 23 and .NET 6 support. Your problem should be fixed here. If you continue to have the problem, please let us know. Please note the correct updating of your API & CLI. Info in the README. Have fun!