[ENG] Visual Studio deletes one of my files when I try to save ?


I have come by a very strange "feature" in Visual Studio 2008. I have installed SP1 on top of the standard application, and now, all of the sudden VS deletes files from my project. I am dead serious!

I have been working on a file all morning, and been saving it from time to time, like I am used to. At one point I try to save my file (a codebehind file), but VS pops up with a filedialoag and asks me to specify where I wan't to save the code-behind...ehhh...whatta ?

Usually you just hit save and VS saves the file. So I try again, but the same dialog pops up, and if try to save it gives me an error of: operation could not be completed.

Now it becomes really really spooky.

Then I try to close the file that i have been working on and re-open it. But then this happens:

errorBugWhatever

So now VS says that there is no code-behind file anymore. Strange. I have neither moved, renamed or deleted the file from my disk. So I open up a Windows Explorer just to see if I can find the file on the disk, but no.

missingonDisk

It is gone from the folder as well. I also checked the Recycle Bin and guess what, it's not there either.

I have heard both good and bad about VS.NET 08 SP1, but before I blame the error on the service pack I would like to know if there is anybody of you guys who'se experienced anything like this ?

Bugger....here goes 50 dollars on file-recovery software, just because I haven't put the code in version control yet!!!


Comments (8)
  1. Atul Gupta says:

    I haven’t programmed much on ASP.NET in a while, and have been more working with WPF and Silverlight and have definitely NOT seen this issue. so not sure if this does exists and that too only for ASP.NET solutions

  2. I’ve just been hit again by this! How annoying!

    I’ve had it happen a few times now, once while I was in the middle of giving a demo to a whole group of developers.

    Has nobody figured out what’s going on here? FYI I’m running VS2008 SP1 on Vista RTM (not SP1).

  3. Andrew says:

    Happend on me too !!!!!!!

    Can i sue microsoft because the hours i spend on the code gone ?

    AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

  4. Andrew says:

    im the person above

    its not only on asp

    its happend on windows application on my case

  5. Christian says:

    same happened with my windows application! VS2008 SP1 as well. When I tried to save the tool asked me whether I want to overwrite the file but it didn’t let me! And afterwards the file was completetly deleted (not in the recycle bin and even not recoverable by a file recovery tool).

  6. Sean Laberee says:

    I am Program Manager on the Core Editor for Visual Studio. We take data loss quite seriously and so I’d like to see if I can help you find your data and also if you can give us any details which might help us isolate the problem.  

    Visual Studio 2005 & 2008 use ReplaceFile to save files which means that there should never be a point in time at which their isn’t either a full copy of the original or the new version of the file on disk.  If you search in your %temp% folder can you find a temporary file which contains your data?

    Is there anything that you would consider special about your configurations or what you were doing at the time of the save?

    I.e. Were you saving to a Network share? If so, what kind of file system would it be saving to? Perhaps, a removable storage drive?

    Has anyone seen this issue before VS 2008 SP1?  

    Thanks!

    -Sean Laberee

    seanla at microsoft dot com

  7. Oh, I see I’m not the only one having this issue.

    I’m also using VS2008 SP1 on Windows Vista.

    I thought it had something to do with TFS, but it seems that it doesn’t (the author said he didn’t have source control yet).

    What I do to avoid the problem is, when I receive the error, I go to windows explorer to the folder with the file that is being edited (the one VS says is read-only), right click the file – Properties.

    It takes a while to Windows to show the properties dialog, but it says that the file is NOT read only, then I close the dialog, go back to VS and voilá!, now I can save the file without any problem.

    It’s VERY annoying though.

    Hope MS fixes this for the next SP.

Comments are closed.

Skip to main content