Home All Groups Group Topic Archive Search About

ClickOnce doesn't include data files

Author
9 Jun 2006 10:51 PM
Steve Teeples
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?
--
-----------
Thanks,
Steve

Author
10 Jun 2006 7:53 AM
Marcus Heege
Hi Steve,

"Steve Teeples" <SteveT@newsgroups.nospam> wrote in message
news:0E9135BA-C670-41BE-9335-45367664A878@microsoft.com...
>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?
> --
> -----------
> Thanks,
> Steve

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?
Author
10 Jun 2006 3:43 PM
Steve Teeples
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?
--
-----------
Thanks,
Steve


Show quote
"Marcus Heege" wrote:

> Hi Steve,
>
> "Steve Teeples" <SteveT@newsgroups.nospam> wrote in message
> news:0E9135BA-C670-41BE-9335-45367664A878@microsoft.com...
> >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?
> > --
> > -----------
> > Thanks,
> > Steve
>
> 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?
>
>
>
Author
11 Jun 2006 4:54 PM
james
Show quote
"Steve Teeples" <SteveT@newsgroups.nospam> wrote in message
news:03824D30-3420-4DF7-B27E-3C28A5388ED5@microsoft.com...
> 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?
> --
> -----------
> Thanks,
> Steve

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
Author
12 Jun 2006 2:04 AM
Linda Liu [MSFT]
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.
====================================================

AddThis Social Bookmark Button