I’m trying to convince my team that using ClickOnce will be good for us regarding deployment and updates. The only issue I have run across that isn’t a seller is the fact that external files ( SqlCe data files, log files, etc ) can’t be coded to exist in the same directory as the executable.
One workaround I suggested is that we always code to use a known directory on the c: drive but that just seems like a hack.
Is there a better way to use ClickOnce with external files or is this only way?
You can choose which files to include in the deployment in the project properties > Publish tab > Application Files…
Is the issue that you have the external files in a folder in the project but want to deploy them to the same folder as the executable? It’s simple at startup to get the executing assembly path and then the path to any subfolders your app requires.
ClickOnce is great but it has its annoyances. The one that’s bitten me most recently is that it doesn’t update if it’s pinned to a Windows 7 Taskbar.