I'm creating a small c# winforms application. It uses a sqlite database to store data, I've been asked to add an update feature into this app so users can update the sqlite files, aswell as any other files, without having to re-install the app.
The problem is, when I do an update it looks as though everything has worked, no errors, etc. but when I look in the applications install directory some of the downloaded files are missing (usually pdf files), once an update has downloaded it creates an Updates.txt file to keep track of the updates it's done. If I then uninstall and re-install the app it acts as though its already done an update even though the Updates.txt file is missing.
The weird thing is that if I hit run in Visual Studio and do an update it all works without any problems 100% of the time, Its just when I build the setup project and install that which causes problems. Maybe there's a setting in the setup project which cause files to be copied somewhere else? I have absolutely no idea.
Please help. Thanks.
EDIT: This is how i'm downloading the files
String filename = "//test.pdf";
WebClient client = new WebClient();
client.DownloadFileCompleted += new AsyncCompletedEventHandler(Completed);
client.DownloadFileAsync(new Uri(dlFile), System.IO.Directory.GetCurrentDirectory() + filename);
UPDATE: This was a permissions issue, to fix it I forced the app to run as administrator.