views:

27

answers:

2

I am trying to deploy an application using ClickOnce. The problem is, I am saving user generated files in the application's working directory. Now when the user installs the next version of the application, his old files will no longer be available to him. What is the best workaround for this problem - or does this mean I have to roll my own installer!

thanks!

+1  A: 

Look into using isolated storage rather than the application's working directory.

This post should help you out.

whatknott
A: 

When Windows Vista came out and developers could no longer store data in Program Files, Microsoft recommended using LocalApplicationData. We store a lot of cached data there, under a folder with our application's name. I wrote a blog entry showing exactly how to do this if you're interested. I call it Where do I put my data to keep it safe from ClickOnce updates?

RobinDotNet
thx Robin and whatknott! Part of the problem is that the user's application data is created from legacy linux tools and many are likely to bomb on long file names. If I do anything radically different from what you suggest I will update here for the next person who faces the same problem. :)
ajgreen