Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Clickonce and app.config


I am installing a WPF Application using the ClickOnce deployment. There are certain settings in the app.config that need to be changed after the Application is installed. Although the app.config exists in the deployment folder as assemblyname.exe.config.deploy , after installing the application I can't seem to find it on the client machine so that I can change the settings.

Where do I look for it, any pointers?

Many Thanks.

like image 685
Anand Shah Avatar asked May 06 '09 09:05

Anand Shah


2 Answers

The application configuration is located in here (replace <username> by the username, XP users look in "Document and Settings"):

C:\Users\<username>\AppData\Local\Apps\2.0

It's located in one of those semi-cryptic subfolders, but I'm sure you'll get it :)

like image 60
Scoregraphic Avatar answered Oct 13 '22 10:10

Scoregraphic


You should use SlowCheetah (a VS extension). With this you can create a transformation for your app.config file based on your build configuration (i.e debug/release). Then when you publish with ClickOnce your app.config file (or any other XML file for that matter) will be transformed into the ClickOnce package which gets published. You can find a sample at https://github.com/sayedihashimi/slow-cheetah/tree/master/SlowCheetah.Samples/Wpf.Transform.

like image 32
Sayed Ibrahim Hashimi Avatar answered Oct 13 '22 10:10

Sayed Ibrahim Hashimi