ClickONce. Change app.config after Publish

  • Thread starter Thread starter Alhambra Eidos Kiquenet
  • Start date Start date
A

Alhambra Eidos Kiquenet

Hi all,



I am working on a windows forms app. I do my development in a development
environment, and I have certain settings in my app.config like connection to
WCF services that point to my development WCF Services.



When I deploy my Application with ClickOnce, those settings are going to
have to be updated to their production values.



What is the recommended method for managing this? I can't imagine modifying
the app.config on production and then having to start over again with the
development values the next time i publish.



In production enviroment I haven't Visual Studio for do again new Publish.



Using ClickOnce VS 2005, I have Custom Prerequisites too



thanks in advance
 
ClickOnce isn't going to like you messing with any of the files in the
deployment. You could manage these settings outside of ClickOnce, but
that gets messy. I simply use a script that configures app.config for
the specific environment and uses MSBuild (Target = Publish, or
something similar) to build it. You don't need Visual Studio to build
the ClickOnce deployment.

Marc
 
Mister, how build the ClickOnce deployment without Visual Studio ?? I have
custom prerequisites to.

Thanks.
 
msbuild your.csproj /target:Publish /property:Configuration=Release

(use the MSBuild from the appropriate framework directory - i.e.
%windir%\Microsoft.NET\Framework\v3.5
or
%windir%\Microsoft.NET\Framework\v2.0.50727

Re the pre-reqs - as long as the pre-reqs are known the the csproj it
should work... (I haven't tried).

Marc
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top