- This article does not cover how to migrate your SourceSafe database to TFS.
- This article is intended to only describe how to migrate a project’s source control from SourceSafe to TFS.
- This article assumes you have already successfully migrated your SourceSafe database to TFS, the project’s source control is currently SourceSafe, and you have a working TFS server or a working visualstudio.com account (aka visual studio online).
- FYI: visualstudio.com hosts a TFS (team foundation as a service) that is free to use for up to 5 users. Very nice! Check it out.
- I have wasted a lot of time trying to figure out how to properly migrate a project’s source control from SourceSafe to TFS. There is no completely correct way to do it.
- What I provide in the post is a method I use, and have used many times now, that seems to be the most reliable method. There may be better ways of accomplishing the same thing, with less steps.
- The instructions as listed below seem to work for me. Whenever I forget a step, or do things out of order, there always seems to be problems.
- So I suggest you follow these instructions exactly as listed below at least once, see if it works for you, then maybe you can come up with a better way.
- If you find a better way, please let me know so I can update this to better help other people.
Visual Studio 2010/2012/2013:
1) Setup source control to TFS:
- Launch Visual Studio.
- Go to Tools, Options, Source Control.
- Change the source control plug-in to “Visual Studio Team Foundation Server”.
2) Connect to team project (do once):
- Open the “Team Explorer” panel (View, Team Explorer).
- If you have not already done so for another project, click the “Connect to Team Project” icon, and enter your TFS server url, username, password, and select the desired team project collection and root team project(s), then click Connect.
3) Set local mapping (do once):
- Double-click “Source Control” within the desired project in the Team Explorer panel.
- If you have not already done so for another project, right-click the topmost element in the sources tree, select “Set Mapping” and selected the desired local folder. Choose wisely, its a pain in the ass to change it later.
4) Get latest version:
- Navigate to the desired project’s path in the Source Control Explorer.
- Right-click, select Get Latest Version. This is important! You cannot check out files in a project unless you have the latest version of the files using the “get latest version” command.
- Resolve all conflicts.
5) Check out the project/solution files:
- Select and right-click the .sln and .vcxproj files, select “Check Out for Edit”.
6) Delete the mssccprj.scc file:
- Navigate using Windows Explorer to the project’s path and delete the “mssccprj.scc” file. This is important! If you do not delete this file, then Visual Studio will always set the project’s source control back to SourceSafe whenever you open the project.
7) Open the project/solution:
- Double-click the .sln file in Windows Explorer or in Source Control Explorer.
- Dismiss the error about the missing mssccprj.scc file.
- Most likely you will get a message about incorrect source control bindings. Select the option to “temporarily work uncontrolled”.
8) Set source control to TFS (again):
- Go to Tools, Options, Source Control.
- Change the source control plug-in to “Visual Studio Team Foundation Server”. This is important! Most likely Visual Studio changed it to “none” or back to SourceSafe in an attempt to match the project’s current source control bindings which is still SourceSafe.
9) Change the project’s source control bindings:
- Go to File, Source Control, Change Source Control.
- Select the solution item and click Bind.
- Select the project item and click Bind.
- Most likely you will be prompted to checkout the .sln and .vcxproj files again, click Check Out.
10) Check in the project/solution files:
- Go to the Team Explorer panel, double-click Source Control.
- Select and right-click the .sln and .vcxproj files, and also any .vssscc files that are marked “add”, select “Check In Pending Changes”. This is important! If you don’t check in the files now, you may have to go through these entire steps all over again. I’ve had to go through this many times. Trust me. Check the files in now!
- Make sure you click “Check In” on the right side panel to commit the changes.
- There should not be any conflicts. If you get any conflicts then you’ve done something wrong. You will have to compare the files and use some common sense. Most likely you will want to overwrite the sever version with the local version (keep the local version).
- You’re welcome!
Instructions for Visual Studio 2005 coming soon!
- If you are using Visual Studio versions prior to 2012, this information is already documented here: How to Not Step Into Functions using the Visual C++ Debugger
- Visual Studio 2012/2013 no longer use the “/NativeDE/StepOver” registry key, they use “natstepfilter” files.
- As of 4/1/2014, there is no official documentation about using the natstepfilter files that I can find.
- The default natstepfilter file is located here:
- C:\Program Files[ (x86)]\Microsoft Visual Studio 11.0\Common7\Packages\Debugger\Visualizers\default.natstepfilter
- If you want to not step into a specific function, operator, etc, while debugging, you can add specific information to this file.
- This feature only works for native code. It works with “debugger type” set to “auto”, as long a the code your are debugging is native C++.
- Here is an example of how to not step into any CString functions (add this inside the <StepFilter> block):
- More examples coming soon!
- Unlike std::vector, std::queue does not have a clear() function.
- Here is an easy way to remove all the elements from a queue:
while( !queue.empty() )
- If you attempt to debug an application which an app manifest with UIAccess=true, you may receive the following error:
Unable to start program [Application].
The application manifest has the uiAccess attribute set to ‘true’.
Running an Accessibility application requires following the steps
described in Help.
- Clicking [Help] goes to an non-existent webpage.
- Set Visual Studio to run as administrator (right-click the VS shortcut, select properties, compatibility tab, and check run as administrator).
- If you are using remote debugging, also set the Visual Studio Remote Debugger to run as administrator.