Windows Develop Bookmark and Share   
 index > ClickOnce and Setup & Deployment Projects > app.config file loation
 

app.config file loation

For each user of a ClickOnce project, where is the app.config file deployed?

If the answer to this question isn't straightforward, please tel me why and point me to an explanation.

Thanks.

LadyReader  Friday, September 26, 2008 4:27 PM

It is deployed to the same directory as your application. If you could explain why you need to know the location of the app.config file, we may be able to help you out some more...

Best regards,

Johan Stenberg

MSFT Johan Stenberg  Tuesday, September 30, 2008 8:45 PM

It is deployed to the same directory as your application. If you could explain why you need to know the location of the app.config file, we may be able to help you out some more...

Best regards,

Johan Stenberg

MSFT Johan Stenberg  Tuesday, September 30, 2008 8:45 PM

Hello Johan,

When you say "same directory as your application", I'm a little confused.

I developed a simple WinForm/Database app in VB5, and have the ConnectionString property saved in the app.config file. When I build and deploy this to another machine, I do not see any "applicaiton folder" anywhere. The only thing I see is in Documents and Settings...Start Menu. And there is no <MyApp>.exe.config file there, only a file that is an "Application Reference" (shortcut) file.

I would like my end users to be able to edit the <MyApp>.exe.config file after install so they can connect it to their database. I have searched for two days and found very little help.

I'm new to VB 2005 so I appreciate your patience.

Todd C  Tuesday, November 25, 2008 9:02 PM

Are you deploying the database as part of the application? If so, you should be able to use the |DataDirectory| placeholder in your connection string:

http://blogs.msdn.com/smartclientdata/archive/2005/08/26/456886.aspx

Best regards,

Johan Stenberg

MSFT Johan Stenberg  Wednesday, November 26, 2008 2:31 AM
Try looking in your %USERPROFILE% folder.You should find the local copy of your ClickOnce-deployed application under %USERPROFILE%\AppData\Local\Apps (some extra folders with somewhat random naming convention).

Your original Settings file should appear in the application folder (see above), but remember that any user-configured values will be saved to a per-user location in USERPROFILE%\AppData\__YourApplicationName__\

NOTE: These locations are Vist-specific, XP paths are slightly different.
Hope that helps (I was just researching this today),
TriggerHappyPhoto  Wednesday, November 26, 2008 7:21 AM

You can use google to search for other answers

Custom Search

More Threads

• cannot deploy my OCX
• Do Custom prereq's have to be located in ...
• Downloading Assemblies on Demand but....
• Changing an installation's files after publishing.
• can't install sqlServer Express as pre-req, even when logged in as admin on local machine
• Click Once Update and Site Minder
• Deployment and security permissions
• Deployment with Visual c# Express edition
• installing the same applcation twice( 2 environments on the same machine)
• Deploying to Machines Without Visual Studio