Reputation: 4508
I am using VS 2010 SP1.
I have two projects:
I added the Sync and lib assembly as a reference to the POS project. In runtime, The POS application runs the Sync application using Diagnostics.Process.Start().
During development everything works perfectly as expected, but when publishing the POS application using ClickOnce, I find that POS.exe.config.deploy is published and the Sync.exe.deploy, but the problem is that the Sync.exe.config.deploy is not published.
I went to Solution Explorer and changed the Build Action to None/Content and Copy to output directoy to Copy If Newer/Do not Copy.
Upvotes: 2
Views: 917
Reputation: 11877
How are you getting the ClickOnce deployment to include Sync.exe? You must have a linked reference to the exe, is that right?
To C/O, Sync.exe is a secondary assembly, and it doesn't know about the config file. You're going to need to add a reference to the config file to the POS project. To do this, make sure you're building Sync.exe first, build it, then add a reference to the config file in the \bin\Release folder. You can try adding it to the POS project as a linked reference so it picks it up each time. If that doesn't work, you might have to just copy it over to the POS project and include it directly.
Upvotes: 2