The files go to a private folder somewhere under the user's app-data
(IIRC) - but you shouldn't be messing with that with ClickOnce; not least
because if you edit any of the files the system will detect the hash
difference and will refuse to run. It doesn't trust anybody.
I think, however, that your requirements can be better met by using the
settings logic built into the runtime (and IDE); just mark your connection
string setting as a user-setting (in the settings designer), and it will be
saved/loaded to/from the correct place in the user's profile.
Marc
Add the XML to your project, and mark the Build Action to "Content", and the
"copy to..." as "Copy Always".
If you add it right under the project, it will be copied to the same folder
as the .exe. If you put it in a folder under the project, it will be copied
to a folder with the same name relative to the .exe. Does that make sense?
Then in the ApplicationFiles page under the Publish tab, make sure it is NOT
marked as a data file, or you have to go look in the ApplicationData folder
for it.
To find it at run time, look in
System.Windows.Forms.Application.StartupPath, and if it's not in the same
folder as the exe, append the rest of the relative path.
One huge caveat: Putting a connection string on someone's computer, even in
an obfuscated ClickOnce folder name, and not encrypting it, is not a great
idea. If it has the user name and password in it, it's a horrible idea. You
should embed it into the application or encrypt the xml file where you are
storing it.
RobinS.
GoldMail, Inc.
---------------------------------
>I want to use one click to deploy my windows application but i want to
> include a xml file in which i can change the connectionstring. How can
> i do this. When you install the actual application where does it
> install the .exe file and is there a setting where i can set where i
> want the files to be installed to.