clickonce xml data file

J

James Wong

Hi,

I have some XML config file in my VB project.

When I use clickonce to publish my project, the execute files and the xml
data files are not in the same folder of the client computer. How can I get
the real path of my xml data files? Thanks

for example,
execute file path:
C:\Documents and Settings\ABC\Local
Settings\Apps\2.0\ATYXOMR1.MJO\3MBQ94PV.A0L\clic..tion_4593a29cad7ddd6d_0001.0000_8d6cefa7f90cf08d

xml data path:
C:\Documents and Settings\ABC\Local
Settings\Apps\2.0\ATYXOMR1.MJO\3MBQ94PV.A0L\clic...exe_4593a29cad7ddd6d_0001.0000_none_d9f1875ab364a710
 
L

Linda Liu [MSFT]

Hi James,

Thank you for posting.

Have you set the Publish Status of the xml file to "Data File"? If so,
after installation, the xml file will be located in the Data directory in
the end user's Local Settings folder. For information on reading from and
writing to the Data directory, you could refer to the following link.

http://msdn2.microsoft.com/en-us/library/d8saf4wy(d=ide).aspx

However, you have another option to publish the xml file. You could set the
Publish Status of the xml file to "Include". In this case, after
installation, the xml file will be located in the same path where the
application's executable (.exe) files and assemblies reside. Thus you
could access this xml file
directly in your program.

Hope this helps.
If you have anything unclear, please feel free to let me know.



Sincerely,
Linda Liu
Microsoft Online Community Support

============================================================================
=============================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

With newsgroups, MSDN subscribers enjoy unlimited, free support as opposed
to the limited number of phone-based technical support incidents. Complex
issues or server-down situations are not recommended for the newsgroups.
Issues of this nature are best handled working with a Microsoft Support
Engineer using one of your phone-based incidents.

============================================================================
=============================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
L

Linda Liu [MSFT]

Hi James,

You're welcome!

If you have any other questions in the future, please don't hesitate to
contact us. It is always our pleasure to be of assistance.

Have a nice day!

Sincerely,
Linda Liu
Microsoft Online Community Support
 

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

Top