Why does AutoRecover ignore my dtsx package? - visual-studio-2013

I'm having a very bad day. My laptop sometimes kills itself when I undock it. When that happened this morning, I was concerned that I might lose track of various notes that I had been keeping, but I certainly didn't expect to lose all of my changes on a complicated dtsx package. AutoRecover always presents any unsaved changes to me when Visual Studio restarts.
Not today.
Why on earth didn't AutoRecover preserve my SSIS package changes? Are only certain file types monitored? I found where those files should have been kept, and I went looking and found nothing. As I'm redoing all of the changes that I lost, I still see nothing in the backup directory. So even now, I can see that my changes are not being preserved.
I also verified that AutoRecover is turned on:
Is this a problem with Integration Services projects? Is there any way to turn on AutoRecovery for these files?

Related

Is there a way to save the Visual Studio workspace manually?

I've given up trying to stop VS from crashing (usually 2 to 3 times a day). Now I'm moving on to finding a way limit the amount of work that needs to be redone when I re-open my project after a crash.
When VS crashes, any changes you have made to the workspace such as which files are open, pinned etc are gone. Any breakpoints, bookmarks etc are also gone. If VS is shutdown normally without crashing then all these workspace changes are saved, but if it crashes they're lost. I am now at the point where I deliberately shutdown VS every so often just so that any changes will be saved when it inevitably crashes.
Is there a way to manually save the workspace?
For anyone who may come across this, the problem seems to have been related to a plugin called VisualAssist. A recent update seems to have completely fixed the issue.
File - Save all should save most of the current workspace configuration.

When merging changes in the MSVS2013 IDE, is there a log of what occurred?

I pressed Alt-E which I mistakenly thought was Merge Changes In Merge Tool, however, that was actually Keep Local Version. Is there a way to go back? Is there a way to find out what was merged, as in what file? Ugh! :(
I have completely stopped working in case I erase something of importance.
I'm using MSVS 2013 Professional.
Here's another possible approach.
If you know what version of the code you started with before you started making your current batch of changes, you can grab a copy of your local workspace files. Then Undo all your Pending Changes. Then delete all the files in your local workspace (in Windows explorer). Then do a Get Specific Version to get back the old version of the files from where you started, then copy-paste in your updated files from your backup copy. Then do a Get Latest. This should retrigger the Merge process.
I don't know a great answer to this problem, but I do know one thing you can do (I hope you don't have a massive amount of pending changes, or this will get tedious).
The problem is that TFS thinks you have now merged the server changes (other devs changes) into your workspace, even though you told it to basically toss them. If you try to check-in now it will blow away other developers changes in TFS.
What you can do is go through each file in your pending changes window, and do a Compare With Latest Version. This will show you the differences between your local file, and the file in TFS. You will notice two types of differences:
the changes you made which you can just skip past.
Changes that other devs made and are on the server, these differences will show up as though you have deleted/undone that code locally
For the changes that other devs made, you will have to manually reapply them in your local workspace before you check-in.

TFS 2012 not detecting deleted files in pending changes

We have multiple developers on our team. This works for everyone except one developer, but we cannot seem to find the reason it does not work for this individual. We all have VS premium+, TFS 2012 power tools installed.
We have a branch. We get latest version from branch. Go to windows explorer and delete all files in folder "sdk" (there exist no subdirectories in sdk/). Then we copy into it a bunch of files. (This effectively leaves some files as new files, updated files, identical files or removed files when compared with what was deleted.)
When we go to pending changes, these changes show up under "Excluded Changes - Add(s) 51, Deletes(3)".
Except for one developer. His system does not recognize these changes. What might cause this to not work for him?
If it helps troubleshoot, he is also the only developer that if he were to delete these files via power tools delete option in windows explorer, his .dll files get locked. This does not happen for anyone else either.
This is what we've checked so far:
EDIT: Solution Found - Thank you all for the responses! It was indeed the local vs server workspace option. Setting his workspace to local solved these and a few other issue he was apparently having.
Make sure that the developer is using a "Local Workspace" as opposed to the "Server Workspace".
This is a concept which was introduced in TFS 2012 which helps developers to work offline as opposed to server workspace in earlier versions which did not allow that. TFS 2012 changes up the workspace options. Server workspaces are still available, and work exactly has they have in previous versions. However, TFS 2012 now contains a new type of workspace, called a Local workspace. Again, this is an oversimplification, but in a Local workspace, all the files are read/write, not read-only. The meta-data about the files is stored in a hidden folder in the root of the workspace, which allows edits, renames and deletes to be done locally without any communication to the server.
This improves the offline story with TFS significantly, as you no longer encounter issues with editing read-only files. It also makes it easier to work with other tools (such as Notepad) to edit code files. Making a change to a code file using Notepad will still mark that file as edited, which will be picked up by TFS the next time you connect.
LINK
This only ever happens when a user tampers with a local view of source control (be it a local workspace, or not). If all you ever did was get latest from TFS this would never occur, instead, the local view of what is in TFS would always be properly managed.
Also sounds like a bad merge, e.g. getting latest (where the files no longer exist) then copying in old content (introducing untracked files.) One thing you might try doing to correct the issue is doing a forced fetch from TFS after deleting the local workspace contents BEFORE attempting a merge. This will ensure that the local workspace is up to date an accurate with what the TFS server believes is truth, if it still occurs after merging in content then the problem is almost certainly within the merge process the user is going through (i.e. PEBKAC, or a knowledge gap about what they are doing.)
If you unshelve old content (pre-deletion) into the local workspace (where the deletions have already been performed, according to the SCC, and thus locally because of a sync/get-latest) then the unshelved files will effectively become untracked and it's up to the user to clean up the mess. This is identical to a user having copied loose files into their workspace that TFS never had any knowledge of. TFS isn't going to prune untracked files for you, I believe some other source control tools might do this as a configurable default, TFS does not.
That this is only happening to one developer in the team suggests that the other developers, one at a time, should sit with this developer and drive using "their process" to see if it still occurs for them. More often than not this comes down to a bad process a user has adopted, and putting a different person in the chair can help highlight why it has been occurring and help end it. A disciplined build/source manager and/or developer should not experience this problem.
Very interested in knowing what the problem turns out to be.

TFS re-add Visual Studio 2010 project

I have a project that is source controlled using TFS. I was doing some coding on my laptop when, unfortunately, my computer crashed and I ended up having to re-install Windows. I was afraid that all my code would be lost, but thankfully I was able to restore the code files.
My problem is that now I need to commit the changes to TFS. Currently the projects do not have any source bindings. I can't overwrite the current code base because there is work that has been done since my crash by other devs.
How can I add the changes I've made to TFS?
The way i've done something like this is kinda hackish, but what i usually do is get latest from TFS onto my laptop, and checkout all of the code from the project in question. Then i take the changed code and copy it over that folder, check it in. TFS should be smart enough to only really affect the actual code items that have been changed. You can see in the history the actual files that got changed to be sure.
If you know the exact files that you need to update, then that will make things much easier, because you can do the above steps, but then just check out the particular files you know of. You can do a compare between them and your new code to make sure that you don't overwrite anything your other programmers have done. Again, hackish, but i don't know of any streamlined way to do this.
You might want to make sure that you download the TFS visual studio extension, since that will give you rollback capability.

Visual Studio 2008 with Source Safe: Recover data lost by auto-checkout?

I am using Visual Source Safe 2005 and Visual Studio 2008.
##$% this Source Safe. With programs like Source Safe that ##$% up my data, who needs viruses, hard drive failure, and other assorted calamities.
My story starts with getting my workstation re-imaged on Monday this week. After the machine was re-imaged, I downloaded from Source Safe the source code I was working on. Thursday afternoon, I noticed that as I was working on my source code, the files were not being automatically checked out from Source Safe as I worked, however there was no problem saving my work on the disk.
So... I needed to check in my work. I noticed that the files (not checked out from Source Safe) were not read-only as they usually are, so I made them read-only.
I feel like I should have backed up my data locally at this point and I'm now kicking myself for not doing so, but the next thing that I did was I went back to Visual Studio to continue my work and see if I could get the program to automatically check out the files I was changing.
The first time that I began to edit a file (BigLongCodeFile.cs), it automatically checked out the file for me as I had hoped. However, in a split second it displayed a dialog that explained, "Your action caused a check out of file(s) BigLongCodeFile.cs, and a new version from source control has been loaded in the develpment environment. Please re-do your changes if necessary." And just like that, Visual Studio undid all the changes I had done to that file since Monday, representing hours of lost work for me.
It didn't prompt if I wanted to do this, just showed me a dialog informing me that the damage is done. With development tools like this, who needs a virus to destroy his work?
Is there some way to get my data back, or some way to avoid this?
The mistake was setting the flag back to read only, which was exacerbated by not making a copy of the files when you found things were not getting auto checked out from SourceSafe. Unless the new copy was written to a different location on the drive, which is unlikely, you are currently hosed. If it could possibly be saved elsewhere (note I am talking physically saved, not logically saved (ie, what you see in Windows Explorer == logical)) you can use an undelete utility. It is a long shot, but you can try undelete tools; I would not hold out much hope.
One of the first things to do when you find source control is not working correctly, and you have altered files, is to make a backup of the folders you have worked on. A simple copy of the structure to a temp location is good enough. Then fix the source control issue and be prepared to consolidate your efforts. There are tools for this, if you are worried someone else might have edited files.
As for why VS did not warn you? The file was flagged as if it was not changed. VS noticed something after the save operation (size change, most likely) and warned you something was in error.
In the past, I have been burned by trying to second guess software, so I know the pain. That is why copy backup is a good practice when you notice something strange. This is less problematic in TFS, but I would imagine it might just overwrite a file that appeared to be checked in (read only flag set) as well.

Resources