CSharp/C# >> ClickONce. Change app.config after Publish

by Marc Gravell » Sun, 07 Sep 2008 16:59:35 GMT

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

CSharp/C# >> ClickONce. Change app.config after Publish

by QWxoYW1icmEgRWlkb3MgS2lxdWVuZXQ » Mon, 08 Sep 2008 15:54:01 GMT


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

Thanks.

CSharp/C# >> ClickONce. Change app.config after Publish

by Marc Gravell » Mon, 08 Sep 2008 16:08:04 GMT

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

Similar Threads

1. ClickONce. Change app.config after Publish

2. Add XmlElements to App.config & show changes in Open App.config - VS.Net IDE

3. Published app - shared config?

Hi

We have an app which we've Published to our server and several users have 
installed.

It seems that the application config file (in which our app saves some 
settings) is saved uniquely to each user? Is this true?

Is there a way of having one shared config? I know our app creates an xml 
file which appears to be shared. Can this be done with the config, or do we 
need to create another XML for our shared settings?

Thanks,


Dan

4. Multiple App.config files with ClickOnce - CSharp/C#

5. ClickOnce - How to add config file to list of files that get published

This (seemingly) simple item has escaped me after pouring over tons of
posts about ClickOnce.  How does one add a config file
(myapp.exe.config) to the list of executables and dlls that get
published with a ClickOnce application?  All I want to do has have a
standard config file get dropped down in the folder where the
application gets run from.  I don't want to have to edit the manifest
every time I publish.  When you go to the publish tab in the project
settings and click on the "Application Files" button, it seems to find
the EXE, and DLLs correctly.  How can I make sure that my config file
gets added to that list as well?  TIA

Roy

6. Identifying the Publish Version of a ClickOnce app at Runtime - .Net Framework

7. Publishing VB6 apps with ClickOnce

I  Clickonce published a very simple (a form with a button) VB6
application to my hosted web site.
Clicking install should cause the form to download and open but,
instead causes the XML application script text to show in the browser
window.

This is repeatable when install is attempted to any of 3 different XP
systems (including the development system) and 2 different webs but
works just like it supposed to when I installed from the development
systems's own local XP-Pro webspace.

I am including only one prerequisite that I know to include, .Net 2.0.

Has anyone seen this happen?
I will be most appreciative for any ideas you have.

TC

FYI if you want to see this script that is giving me a
headache.....tickstream .com and click the download banner to get the
install page then click Install.  If you don't have Dotnet2.0, it will
ask you if you have .net2.0 (although it just determined you dont have
it).  If you tell it to just launch anyhow you will get the XML text.
If you click install, it will install DotNet2.0 and then give you the
XML page so may want to decline the download.

Tom Frederick
863 318 9156
W4OK

8. app.config and Published