Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

how to include datafiles in a bin directory with a clickonce deployment (vb.net)

Posted on 2013-11-29
3
Medium Priority
?
285 Views
Last Modified: 2014-04-03
hi, my application, build with vb. net, assumes that some 'datafiles' are available in the bin directory.

I'm using a clickonce deployment. Can't get it working: when starting the app it complains that it cannot load that datafile.

I changed the file properties of that file (build action "content", copy; always) but it still does not work.
Does anyone has a suggestion?

thanks.
0
Comment
Question by:aatjan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 40

Accepted Solution

by:
Jacques Bourgeois (James Burger) earned 2000 total points
ID: 39801792
In the Publish tab, when you prepare your deployment, click on Application files, activate Show All Files at the lower left bottom, and make sure that your file is marked with Include.

Note that  in .NET, unless you run the application as an administrator, files distributed in the same directory as the application are usually readonly. This is true whether you deploy with ClickOnce or through a more standard .msi deployment in Program Files.

Files that need to be modified by the user should be installed in another directory. This is easy to do with a standard setup, because you can specify the location of the files, but not so with ClickOnce, where you have absolutely no control over the location of the files.

What I do in such situations is to copy the files that need to be edited from the installation directory to either MyDocuments or the user's Application Data directory. This is naturally done only when the application starts for the first time. Afterward, it checks for the presence of the copied files and does not copy them if they are already in the correct location.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …

609 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question