I worked a few hours building a new solution in Visual Studio 2010 (C#). Created the solution, built and debugged a bunch of times, saved regularly using ctrl+S... AutoRecover is set to save every 5 minutes as well.
Windows was installing a VS 2010 update and rebooted automatically, forcing a shut down.
On restart, the whole solution was gone. The only traces I can find are an empty folder with the solution's name in the "backup" folder and 2 early built located in "C:\Users\USERNAME\AppData\Local\Microsoft\VCSExpress\10.0\ProjectAssemblies\fh5gnjqk01" which I think were created when the build failed.
Is there any chance that newer files are still there somewhere in some temp folder or something, or should I just consider it lost and move on? Since I built and debugged the solution, I suspect there must be a newer ".exe" somewhere that I could reuse with reflector if nothing else.
If not, what should I do in the future to guarantee that the solution is really saved on the disk?
Related
I have (fairly large) C# solution in VS 2019, running with ReSharper. Since a few days - and I can't make out the trigger - the following happens:
I change code, add a breakpoint (not required, but makes the issue show nicely), click "Start" (triggering a build and a run) and the application runs, but using old code.
The breakpoint changes to "broken" after the build, which is quick. And the build log is unbelievably short, without any warnings, but also without errors. It lists that the project I made the change in was successfully rebuilt or at least that the build was started.
I thought I may have this issue, but the code executed is the old.
Is this a caching issue? Can I get better logs somewhere?
Is this (full re-install of VS) the only solution?
EDIT: It appears to be getting worse, by now I have to manually/explicitly rebuild my solution before running (almost) every time. And, if this is any hint: while trying to fix the issue, I deleted the hidden .vs folder (where the. suo files lives) - and it has not been re-created. Shouldn't it have been?
EDIT2: The link from dwcanillas below inspired me to search deeper in my solution folder for any nested .vs folders and, indeed, I found a few - not for every project, but for some. I deleted them all and today so far it appears to be better.
CURRENT SOLUTION (another visual studio voodoo recipe):
Clean top-level solution
Close Visual Studio
Delete all ".vs" folders (hidden, in every solution folder)
Open Visual Studio
Rebuild top-level solution
Observed side-effects: Previously unloaded projects will be loaded again. But there's probably more...
You may have to, though try rebuilding it first, and cleaning the solution as well.
Im getting below error when im going to rebuild my setup project in visual studio 2015.Please advice to resolve this:
The message means that the install of Visual Studio 2010 Shell (Integrated) is broken, so Windows is attempting to repair it. Also, it looks like it was installed from the internet, which resulted in the setup being performed from a temp folder that has since been deleted. It is always better to download the setup (such as the MSI file) and save it somewhere. It is also possible that the C:\Windows\installer folder has been damaged or has had files deleted because normally the repair would be performed from there, which might have been happening for a long time but you wouldn't have noticed until the cached MSI file was removed from /windows/installer.
The fix is to get hold of the exact same MSI file that was used to install VS 2010 Shell MSI file and save it somewhere, and browse to it when this happens again.
The cause might be a conflict between VS 2010 and VS 2015, or some removed or changed shared files. The application event log will have an MsiInstaller entry that says what is missing.
I was creating a website using visual studio and accidentally deleted that project folder. :(
It was three months project. Is there anyway to get it back? visual studio 2013
Are you using any Source control management system (e.g. SVN, git etc...)?
If so, this is the time for a revert. If not, you should...
Was the project deleted from your disk? If not (it shouldn't..),
just re add it to your solution. Chances are it is still in your solution folder
(You can easily open it via Visual studio).
If it was deleted from your HDD, this is where things starts to get tricky. Try restoring deleted data from your disk.
You will need a software to help you with this task (e.g. this one was randomly selected using a simple google search).
In case nothing of the above works you can take your HDD to a professional lab to restore the deleted data.
If it is just a small project, I wouldn't bother. If it is not, Shame on you for not using SCM ;0)
Good luck...
If nothing of the above works, I am sorry for your loss...
For years now, across multiple versions of Visual Studio, there has been a bug with the Publish Web command (the one you get when you right-click on a web app and click Publish).
Very intermittently (about 10% of the time), some files that have changed will not be deployed if they already exist in the output directory. This is highly disturbing behaviour as you can never be confident that all your changed files have been copied to the destination correctly. The only workaround I know is to totally clear out the destination directory but this is a big hassle.
Does anyone else experience this issue? What could be the cause? Are there any known workarounds?
I have run into this too. And yes, it is disturbing. Especially since we seem to have to wait 2 years for any Visual Studio updates.
The only workaround I found was to check up some of my changed ASPX files, and verify that they changed, and if not, I select the Delete all files option in Publish to force a complete rebuild (slow and tedious).
I started a new project this morning and, after putting ~3 hours of work into it, I tried to open a file from another project to get some code from it. I got a warning about discarding an unsaved object. After telling it to go ahead, I realized that it was referring to the project I had just been working on and not another file that I had just opened.
Even though I never saved the project, the various files containing my code and dataset had to exist on the hard-drive. Are they still there, perhaps in a temp folder? I'm developing on a box running Server 2008 R2 (don't ask, not my decision :) ).
This may help:
http://blogs.msdn.com/b/saraford/archive/2008/02/14/did-you-know-where-visual-studio-saves-auto-recovered-files-in-the-case-of-an-unexpected-shutdown-151.aspx
Also check C:\Users{Username}\AppData\Local\Temporary Projects
You could try one of those undelete programs and see if it finds anything.
Tools > Options > Projects and Solutions
and check the item
Save new projects when created
Save frequently. :)
Need to give one related input. Who the hell had the idea to implement this feature???
I used Visual Studio until 2003, then came back again to 2010 now.
After 2 days work, saving all the time, as I used to (Ctrl + S), I close the project and decide not to save the solution itself.
Done. All lost. Nothing can be recovered from anywhere in the computer.
How can a developer implement a dumb idea such as dropping all work in an "in memory" project.
You either know about it already or you will get screwed; like thousands found on Google during my desperate search.
Did Microsoft VS team look at it at least?
So frustrating...
It might be worth checking out the folder where AutoRecover files are saved.
You can find the default file location in Visual Studio on the Tools - Options menu. Look in the Projects and Solutions section - expand that and look in General to find the default file locations.
My files were under C:\My Documents\Visual Studio 2008\Backup Files.
I had this happen to me this morning. I worked on a new project yesterday and windows ran an update last night. Despite having debugged my program - the project had not saved - for some reason it didn't occur to me that the project might not be saved. I left the program running on my computer when I went to bed. This morning when I work up, I saw that windows had run an update. A few hours later, I saw that my computer had no trace of my program. I realize this is an old post, but I thought I would shed some light on what I did, since i was able to recover my files.
First I went here: http://windows.microsoft.com/en-us/windows7/recover-lost-or-deleted-files
In Visual Basic 2010 Express, a backup folder is created with your project name. Sure enough, my project backckup folder was there: Documents\Visual Studio 2010\Backup Files\MyProject. But, the folder was empty. I "restored this folder to a previous version" using the steps listed in the link above. After doing that, the folder was still empty, BUT, the temporary folder "C:\Users{Username}\AppData\Local\Temporary Projects" now contained my project's folder and files. Prior to running the "restore to previous version", the temporary projects folder was also empty.
So, I was able to copy the folder out of the Temporary Projects folder and I am as happy as one can be - or close to it.
Hope that helps someone out.
A note to the answers above, I had a mini jumpscare when i could not find my project anywhere, not in the recent projects nor in the visual studio projects folder.
I eventually found the project in the visual studio projects folder of the admin user;
I was looking at:
C:\Users\LocalUser\Documents\Visual Studio 2015\Projects
Whilst the project was saved under:
C:\Users\LocalAdmin\Documents\Visual Studio 2015\Projects
Bottom line is; also check the \documents of the admin user. This likely happend because i was testing an admin only application and visual studio was running with the admin's user profile loaded.