ClickOnce doesn't include data files

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

Guest

I have an application that I'd like to deploy via ClickOnce from a NETWORK
share server. I've walked through the wizard and deployed the application,
but when I run the app all of my data files are missing. I have XML, TXT and
custom data files that my application uses during execution. How do I get
ClickOnce to install those data files along with my DLLs and EXE file?
 
Hi Steve,

Steve Teeples said:
I have an application that I'd like to deploy via ClickOnce from a NETWORK
share server. I've walked through the wizard and deployed the
application,
but when I run the app all of my data files are missing. I have XML, TXT
and
custom data files that my application uses during execution. How do I get
ClickOnce to install those data files along with my DLLs and EXE file?

Have you added the files as "content" files to your project?
Can you see them in the "Application Files" dialog that appears if you click
the Project Settings/Publish/"Application Files ..." button?
 
The files are not linked to my EXE project. The files are associated with
libraries that are linked into my overall project build. I noticed that data
files linked directly to the EXE project are brought over as data files, but
files associated with libraries are not. I'm thinking I need to redesign my
program to either put the files into resources or have them reference in the
main EXE project. What do you think?
 
Steve Teeples said:
The files are not linked to my EXE project. The files are associated with
libraries that are linked into my overall project build. I noticed that
data
files linked directly to the EXE project are brought over as data files,
but
files associated with libraries are not. I'm thinking I need to redesign
my
program to either put the files into resources or have them reference in
the
main EXE project. What do you think?

I usually add Data files ( like an Access database for example) to a folder
in my project and on startup of my application I use Application.StartupPath
or :

(be sure to include System.Reflection at the top of the Class where this is
used)
Path.GetDirectoryName([Assembly].GetExecutingAssembly().Location)

to direct my program to the database. That way, when I used ClickOnce
Deployment, the folder and the database will be included in the
installation.
james
 
Hi Steve,

Thank you for posting.

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.


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.
====================================================
 
Back
Top