0
Answer

Can't save to original file because of Vista shadow copy

KYAW MYINT AUNG

KYAW MYINT AUNG

15y
3.1k
1

Hi,
My development environment is Windows Vista, .Net 3.5 and WPF.
I have a xml file that I store register information inside.
When I deploy my WPF project, the file is located under AppDomain.CurrentDomain.BaseDirectory + "\\Data\\Register.xml".
But everytime I save to this file actually save to another shadow copy file  C:\Users\User\AppData\Local\VirtualStore\Program Files\MyProject\Data\Register.xml.
So if I want to install a fresh copy of my project, although the register file is a new one, I still get the old data from shadow copy one. 
So I can not make a new registration because of old data I got from shadow copy file.
I can delete this shadow file from my program, but the original file has never changed. So after I have made a new registration, next time I login, it will ask for registration again.
It is too bad that I can not store and retrieve data from my original file.
Anybody know any workaround?
Please help me.