Reputation: 190
We have a project with a similar structure:
Project B is our main project in this case and includes project A. Everything works fine when I build and run it. It also works fine, after I publish the application inside a simple folder and copy&paste it to the other machine.
Since we want to deploy the application on a network drive and want the application to automatically update, we want to use "ClickOnce" (Azure and Docker are sadly no options). When I click "Publish" everything works as intended, I get all the files, and when I move them to the network drive I can easily install the application on the devices (they also check for updates).
The only problem I have: The "Additional Files" folder from project A does not get copied during the installation! This means that the application cannot use those files and does not work. In Visual Studio I set those files Copy to Output Directory
to Copy always
. Additionally, I have tried to change the Build Action
, but that is of no use. If I check the published output, the folder is there. It is just not copied during the installation.
Is there any way to tell the ClickOnce installer to move this folder as well during installation?
Upvotes: 2
Views: 1063
Reputation: 190
I found the solution. After reading this (outdated) guide from the documentation (https://learn.microsoft.com/en-us/visualstudio/deployment/how-to-specify-which-files-are-published-by-clickonce?view=vs-2019) I finally figured it out.
When creating or editing a publishing profile, when you reach the point Settings
, you can include files by clicking the Application Files
button. For some strange reason, those files were not even visible at first. But after pressing Show all files
I saw, that those files were excluded. I changed it to include and everything works as intended now.
Upvotes: 3