XNA Creators Club Online
Page 1 of 1 (7 items)
Sort Posts: Previous Next

Game1.cs file got deleted???????????

Last post 11/19/2009 11:22 AM by JCBDigger. 6 replies.
  • 11/19/2009 4:45 AM

    Game1.cs file got deleted???????????

    What the hell!????
    I was just using Visual Studio, I saved as normally, and then for some reason a save window popped up.
    I pressed 'Save' and it said: "Unable to save. Access Denied."

    I then stupidly closed the file in visual studio, looked for it in the directory, and it was gone!!!!!!!!

    Is there ANY way to get it back? I still have other files like my class file I used and everything else.
    How do I get it back? Really???
  • 11/19/2009 5:18 AM In reply to

    Re: Game1.cs file got deleted???????????

    And the lesson is: Use source control or at least back up regularly.

    If you still can't find the file, there may be a ray of hope. System Restore _might_ have saved a copy of your file. I found this out one day when my work PC went into a boot loop and the IT department used System Restore to roll it back. I discovered that a couple of my .cs files stored in C:\dev\myprojectname\etc\ had been rolled back too! So, if you have System Restore enabled, and there is a recent enough restore point (eg recent windows update installed) and your project is NOT in Documents and Settings, you might be OK. The process of getting the files back is quite painful - you need to use SRDiag.exe to gather the files from the correct restore point, extract the CAB and then search for *.cs files (they will be named differently). I did it in windows XP, using information found on this page (and others): http://www.kellys-korner-xp.com/xp_restore.htm.
    HTH
  • 11/19/2009 5:20 AM In reply to

    Re: Game1.cs file got deleted???????????

    Copy your BACKUP COPY.
    Frighten your friends and family with: Scare Me

    Help customers using GRENADES?!?: GoonyCru: Day One

    BASIC Programming Tutorial
  • 11/19/2009 5:34 AM In reply to

    Re: Game1.cs file got deleted???????????

    Have you checked the recycle bin to see if there is an older copy there?

    Also there are a number of free/trial programs on the web that can recover lost files.

    The less you use your computer, the more chance one of these programs can recover your file.
    Game hobbyist hell-bent on coding a diabolical Matrix
  • 11/19/2009 6:21 AM In reply to

    Re: Game1.cs file got deleted???????????

    Try right clicking on the folder in windows explorer, and opening the Properties page.  Is there a previous versions tab?  If so, you might be able to restore an old version of the folder or the file inside it.
  • 11/19/2009 11:01 AM In reply to

    Re: Game1.cs file got deleted???????????

    Scylla:
    What the hell!????
    I was just using Visual Studio, I saved as normally, and then for some reason a save window popped up.
    I pressed 'Save' and it said: "Unable to save. Access Denied."

    I then stupidly closed the file in visual studio, looked for it in the directory, and it was gone!!!!!!!!

    Is there ANY way to get it back? I still have other files like my class file I used and everything else.
    How do I get it back? Really???

    This was the most annoying bug that I could NEVER solve.

    Occasionally, when I hit save it would say "Access Denied." And the file wasn't there. It was like the name was locked and the file was deleted. I thought my hard drive was failing. My workaround was that whenever that happened, I saved the file as File1.cs.. and later renamed it.

    Really odd bug.
    Madness? This is SUNSHINE.
  • 11/19/2009 11:22 AM In reply to

    Re: Game1.cs file got deleted???????????

    Scylla:

    Is there ANY way to get it back? I still have other files like my class file I used and everything else.
    How do I get it back? Really???


    If you haven't already overritten it and it's not in the recyle bin, use a hard drive recovery tool, like Handy Recovery.  There's a very good chance it will be able to get the file back and failing that it is likely to be able to get back most of the contents.  It's only a text file afterall.

    Regards
    **

    Well on the way to creating a 3D First person controls shooter with Over the Shoulder view... Another few YEARS and it'll be done!

    http://games.discoverthat.co.uk/ - Skinning Sample Dude for Blender and XNA Parallel Spilt Shadow Maps plus other stuff...

    My game development blog - Well a few notes from time to time...
Page 1 of 1 (7 items) Previous Next