visual studio 2013 auto recover breakpoints and bookmarks - visual-studio

Whenever I get a bluescreen of death or a locally installed program freezes my computer and I have to reset VS does a nice job of recovering the text files I'm editing. Unfortunately it loses all the breakpoints and bookmarks I have saved, they seem to revert make to an early state from weeks before. Is there a way to autosave/autorecover bookmark and breakpoint. Sometimes this results in days of work lost.

Breakpoints (and probably bookmarks) are stored in the .suo file. More info here.
It's not recommended to commit these to a version control repository but you could write a script to copy the file to another directory location, then run that script as a scheduled task.

Related

Visual Studio IDE loading old desktop layout

I am using VS 2017 and whenever I've closed a project in the past, the same tabbed windows are automatically opened making it easy to get going where you last left off.
As of several months ago, the same old set of windows that I had opened months ago reopen each time I restart VS. This means that I must close all of the old VS windows that I no longer need and manually open the ones I do.
It's like if my IDE state is not being saved anymore. I've deleted everything in my %USERPROFILE%\AppData\Local folder but this made no difference at all. Additionally, I verified that my project files were not set to 'read only' but this did not help.
Any suggestions?
P.S. I had forgotten to mention that old and obsolete breakpoints will always be set each time you open a project.
The person who deserves credit is Sergy Vlasov for solving my problem.
There was one additional issue that I had not mentioned, one that bothered me for a few months. Some parts of my code had red error lines underneath even though my code would build fine.
The resolution to this was to simply close VS, then delete the .vs hidden folder within my project. Upon restarting VS, those lines were gone.

Visual Studio 2013 Diff Tool

I'm used to edit files in Visual Studio 2013 Professional (update 3) using diff tool with auto-synchronize option enabled. Recently I'm not able to edit my local files anymore: they correctly appears in my Pending Changes view, but the second I compare them with my previous version (no matter if workspace or server) a small lock appears in the tab (eg: Diff - MyFile.cpp [Lock])
Any idea how to fix it?
If I try to save my file it seems a copy is saved in my temp folder with the extension - Copy
You might try updating VS2013. I have update 5 now and the diff tool seems to work reliably there.
I also found the diff tool to get somewhat flakey after a while when I was using the command line to launch it. I'm guessing that after enough bad input some prefs file would get botched and it would simply fail silently. Reinstalling the update would solve the problem, but that's a rather time-consuming process. Now that I use the VSCommands extension from Visual Studio Gallery to launch the diff tool it works reliably.
However, I'm having a similar problem as yours when I use the /m switch to do a merge of unversioned local files. A little lock icon appears on the file tab, even though I can "edit" in the GUI. However, saving doesn't save anything, and closing a dirty file just throws away the changes without even prompting! It's driving me nuts, because I can edit the same files successfully with the diff tool. Any help appreciated!

Visual Studio hangs on startup after I cancelled getting latest

I tried to map a workspace and started getting latest from it, the number of files to download were quite large, talking gigabytes.
Anyway I cancelled it halfway through as I needed to do a restart. Now when I launch VS (with or without a solution) it just hangs saying "Preparing solution" and a balloon pops up on the left saying its doing an internal operation.
I think its still trying to get latest in the background or connect to the workspace, how can I cancel this?
I would try the following (from fastest to the most thorough one).
in windows explorer/dos prompt search for suo files and delete them (they are marked as hidden). Download all files from commandline or source control explorer. Open solution
redo your steps, creating new workspace just don't cancel this time
Do note, if vs is hanged on something, make sure that no modal window is displayed, waiting for your input.

Visual Studio loses bindings to TFS suddenly

Why would my VS solution lose its TFS bindings suddenly? I have been working on a project for six months and this never happened. As soon as I opened a VS project/solution, I could check in/out, view history by right clicking on any given file. But suddenly, I dont see those options to checkin checkout etc any more when I right click on a file in VS studio solution explorer.
The team explorer window still brings up the source folder structure and I can get latest or get specific from there but did any one see this kind of behavior? Please let me know what I can do to avoid these situations in future.
Did you lose connection to the TFS server any time recently? I've had this happen in the past on unreliable network connections when working via TFS remotely. The solution and all projects therein would "go offline" and would appear to lose their bindings. This made it particularly unintuitive when the connection was re-established because changes made while "offline" weren't always found.
If you right-click on the solution or the projects, is there an option to "go online"? You might check the various menus for such an option as well.
Did you move the source files to a different location on your harddrive, or change your workspace mappings?
Try opening the solution/project by double-clicking the .sln file in Source Control Explorer instead of opening it from windows explorer.
You can also try bringing up the Bindings dialog by going File -> Source Control -> Change Source Control
I recently had a very similar experience. I had made several changes which I thought may have influenced my connection resilience. After reversing out of 2 of them and the problem persisted, I finally clocked what it was.
One of the new extensions I am using is NuGet (http://nuget.codeplex.com/). Every time I attempt to add a library my TFS connection fails and is unrecoverable till a restart of VS 2010.
See: http://nuget.codeplex.com/workitem/725
There is a work around that has been reported and working which may help you even if this is not your problem.
see http://blog.rthand.com/post/2011/08/26/Fixing-combination-of-NuGet-and-Team-Foundation-in-workgroup-configuration-401-Unauthorized.aspx
Happened to me also. I was removing a whole bunch of mappings for old releases under the local workspace. It was taking over 40 minutes so I killed it. The mapping has been removed to the older branches but the branch left behind had been disconnected from TFS.

visual studio keeps asking to save project file as

I am using VS 2010 and recently I moved some files around and changed paths etc.
The solution still compiles correctly and all files are able to be loaded/compiled without error however just about every time I go to compile after a change it gives me the save as dialog and asks me to save one of the projects, if I try to give it a new name or something the dialog does not exist nothing I do can make it exit apart from pressing cancel.
If I do a build straight after cancelling it works fine and I'm not presented with the save as dialog. I have verified that the project file is not read only.
Any ideas as to whats going on here.
The solution is stored in TFS 2008
You need to do 2 things
1- remove the read-only tick from the project folder
2- when a save-as window prompts at build, just overwrite the project
next time you build, the window won't pop up
You need to run VS as administrator. (right click on VS Icon- Run as administrator)
I solved the issue. When I try to save as this time it gives the error that file is being used by another process. Google Sync prevents to save so it opens save as dialog.
You should put your project under a folder not sync while working.
Are the bindings in TFS set up correctly with the new location? TFS will mark files as read only unless they get checked in. It might have been marked as such before you moved everything around, and now, isn't being checked out properly.
Also, try closing sync. files tools like google backup and sync.

Resources