Publishing not including XML, XMS files

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a simple application built with several DLLs that access XML files for
information. My local setup works just fine. As defined in my Install
folder, the files are copied to the "application folder" and the DLLs find
them just fine.

However, when I publish the same application to a local server for users to
use the "click once" install feature, my XML, XMS files are NOT copied to the
local machine's application folder. All other files are copied just fine.
Can someone tell me why those files are not included in the "click once"
install?
 
Hi Steve,

Thank you for posting.

Firstly, please check the value of Build Action property of the xml file in
your project . To check this value, right-click the xml file in Solution
Explorer and select the Properties command. In the Property window, you
could see the value of Build Action property of the xml file.

If the xml file's Build Action property is set to "None" or "Compile" or
"Embedded Resource", the file has no chance to be published. For publishing
the xml file, please set the Build Action property of the file to "Content".

Secondly, you should set the Publish Status of the xml file correctly. Open
the Project Designer page(right-click the Project icon in Solution Explorer
and select the Properties command) and click the "Application Files.."
button opening an Application Files dialog box. In this dialog box, you
will see the xml file is listed in the listbox. To include the file in the
manifest and copy to the publish location when the publish command is
executed, you should set the Publish Status of the xml file to "Data File"
or "Include". The only difference between these two choices is that the
file will be located in different folders after end users install the
program.

If you set the Publish Status to "Data File", the xml file will be located
in a data directory which is stored in the user's Documents and Settings
folder after the ClickOnce application is installed on an end user's
machine. For information on reading from and writing to the Data Directory,
please refer to the following link.
http://msdn2.microsoft.com/en-us/library/d8saf4wy(d=ide).aspx

If you set the Publish Status to "Include", the xml file will be located in
the Application Directory where the application's executable (.exe) files
and assemblies reside. In this case, you could access this xml file
directly by a relative path.

Hope this is helpful to you.
If you have any other concerns or need anything else, please don't hesitate
to let me know.




Sincerely,
Linda Liu
Microsoft Online Community Support

====================================================
When responding to posts,please "Reply to Group" via
your newsreader so that others may learn and benefit
from your issue.
====================================================
 
Linda,

Your explanation below was very useful. The details work well when the data
file is in the project containing the EXE. However, I am linking into my EXE
some DLLs that are created for my application. These DLLs reference specific
data files (XML, TXT, etc.). It is these data files that are not included in
the "Application Files..." list. How do I get data files from my DLL
libraries to also be included and copied by ClickOnce?
 
Hi Steve,

Thanks for your response.

I have noticed that you have put another issue for the same question in
microsoft.public.dotnet.framework newsgroup which I have already responded.
Please check my answer there and if you need any further assistance on
this particular issue, please reply to me in that thread so I can follow up
with you in time.

For your convenience, I have included my reply as follows:

Yes, I think you should add the XML, TXT and custom data files to your EXE
project in order to publish these files along with your DLLs and EXE file
via ClickOnce.

Thank you and have a nice day!


Sincerely,
Linda Liu
Microsoft Online Community Support

====================================================
When responding to posts,please "Reply to Group" via
your newsreader so that others may learn and benefit
from your issue.
====================================================
 

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

Back
Top