.csproj Assets not copied to output in dev builds #84

Open
opened 2026-01-29 16:30:16 +00:00 by claunia · 0 comments
Owner

Originally created by @yoDon on GitHub (Nov 28, 2017).

When doing full desktop builds, items listed in the .csproj as <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> are copied into the built app's folder hierarchy but when doing dev builds the developer needs to manually copy the files into the destination directory.

For example, if you've included files from the Assets folder in your .csproj, those files need to be copied into obj/Host/node_modules/electron/dist/resources/app/bin/Assets (on a PC) or obj/Host/node_modules/electron/dist/Electron.app/Contents/Resources/app/bin/Assets (on a Mac). I suspect the same issue is present on Linux machines and I'm guessing the destination path matches the PC path but I've not been able to confirm for Linux.

Originally created by @yoDon on GitHub (Nov 28, 2017). When doing full desktop builds, items listed in the .csproj as ```<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>``` are copied into the built app's folder hierarchy but when doing dev builds the developer needs to manually copy the files into the destination directory. For example, if you've included files from the Assets folder in your .csproj, those files need to be copied into ```obj/Host/node_modules/electron/dist/resources/app/bin/Assets``` (on a PC) or ```obj/Host/node_modules/electron/dist/Electron.app/Contents/Resources/app/bin/Assets``` (on a Mac). I suspect the same issue is present on Linux machines and I'm guessing the destination path matches the PC path but I've not been able to confirm for Linux.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/Electron.NET#84