VB.NET ClickOnce

M

Meelis Lilbok

Hi

I have made a project with vb.net and publish it(clickonce)

On firs laucnh app creates a xml file in startuppath\database\file.xml

Now when i update my app and publish it, after dwonloading updates on client
machine cliconce "deletes" my directory and file.
How to prevent this?


Mex
 
S

Susie DBA [MSFT]

vb click once works perfectly

IN VB6

..NET is bloatware, it is neither VISUAL _NOR_ BASIC
 
R

RobinS

Where are you publishing it to? And what to you mean, it "deletes" your
directory and file? You mean the installed one on the client, or the update
that you have put somewhere? Are you hosting it through a webserver?

ClickOnce does not install to ProgramFiles. It installs under the user's
profile, and obfuscates the folders so it's not obvious where it is. When
you perform an update, it creates another set of folders, and does not copy
anything over from the old folders to the new.

If you mean that it deletes a data file, you need to put the data file
somewhere other than startuppath. Try LocalApplication; in C# it's
Environment.SpecialFolder.LocalApplicationData. This will probably work in
VB, or there's a MY version of it. This is where Microsoft recommends you
put data files; they go under the user's directory. If you were installing
your stuff to Program Files, the user would have to have a higher access
level to change files under Program Files. On XP, the above path goes to
C:\Documents and Settings\username\Local Settings\Application Data\. I
usually concatenate it with my application name and create my own folder
for config settings and other data I want to persist when I do updates.

(Ignore SusieDBA -- he's a troll, and does not work for MSFT).

Robin S.
 
S

Susie DBA [MSFT]

oh that's just great

does clickonce work better than InterDev?

ROFL ROFL ROFL
 

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