Visual Studio 2010 Macros Stop Working after February 2014 Windows Update   Leave a comment

Originally posted on Making Visual Studio perfect:

Installing recent February 11, 2014 Windows updates breaks Visual Studio 2010 macros functionality. Macros just don’t run any more without an error message. More specifically, it is MS14-009 update “Vulnerabilities in .NET Framework Could Allow Elevation of Privilege (2916607)” (rated as Important) breaks macros. And more specifically it is the Elevation of Privilege part of this update.

MS14-009 includes several updates for different OS and .NET versions. To restore Visual Studio 2010 macros functionality you need to uninstall the Elevation of Privilege patch specific for your machine. For example, on a Windows 8.1 machine you need to uninstall KB 2898871:

Uninstalling KB2898871 Windows Update

Uninstalling KB2898871 Windows Update

Windows update to uninstall to restore macros functionality in Visual Studio 2010
.NET 4.5.1 .NET 4.5 .NET 4
Windows 8.1 KB2898871
Windows 8 KB2898870 KB2898865
Windows 7 KB2898869 KB2898864 KB2898855
Windows XP KB2898855

The Visual Commander extension (a modern alternative to Visual Studio macros) is…

View original 268 more words

Posted April 18, 2014 by Ed Nafziger in Uncategorized

How to change a project’s source control from SourceSafe to TFS   Leave a comment

  • 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 account (aka visual studio online).
  • FYI: 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!



How to recursively purge deleted items in SourceSafe   Leave a comment

  • Microsoft’s KB article:  How to Reduce the Size of a Visual SourceSafe Database incorrectly says to use this command:
  • ss purge %/ -r (this will not work)
  • It also suggests using “VSSEMS” which seems to be non-existent. The link goes to the author’s personal blog which no longer exists. Good luck finding a legit download.
  • Here are the correct instructions (use at your own risk):
  • Make a backup of your entire SourceSafe files.
  • Make a backup of your entire SourceSafe files.
  • Make a backup of your entire SourceSafe files.
  • Did you make a backup? Just FYI: the first time I tried this it actually deleted everything, not sure why. Everything! Get it? All the projects folders were still there but they were all empty folders with no files. All the files were missing. Make a backup.
  • Open a command prompt.
  • Change directory to your SourceSafe installation path (example: cd “program files (x86)\microsoft visual sourcesafe”)
  • Run the analyze tool:
  • analyze -F -V3 -D -C “path-to-folder-containing-srcsafe.ini”
  • If you get any errors run it again.
  • Set “SSDIR” environment variable to your srcsafe.ini path (example: set SSDIR=e:\dev\sourcesafe\msdev60\database)
  • ss purge -r %/*
  • Enjoy!



How to not step into functions using the Visual Studio 2013 debugger   Leave a comment

  • 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!

How to remove all elements from a std::queue   Leave a comment

  • 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() )

Posted March 13, 2014 by Ed Nafziger in C/C++, STL

Tagged with , , , ,

Debugging with UIAccess=true   Leave a comment

  • 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.

[OK] [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.

Automatically insert/update filename, date, revision number in source files (using Source Safe)   Leave a comment

  • If you use Source Safe, you can add auto-updating fields inside comments to your source files so that whenever you check-in/check-out your files, Source Safe will automatically update those fields in your source files.
  • This is useful for reference purposes, or when doing file-content searches for specific criteria. This cannot be used for updating preprocessor defines, or anything useful during compile time.
  • There are probably a lot of other fields, but these are the ones that I use:
$Workfile: $
$Date: $
$Revision: $
$Author: $
  • Just add those fields inside a comment anywhere in your source files.
  • Whenever you check-in/check-out the file, Source Safe will insert/update the fields.
  • You will end up with something like this:


$Workfile: DoStuff.h $

$Date: 4/25/13 4:47p $

$Revision: 65 $

$Author: Ed $


Posted January 28, 2014 by Ed Nafziger in Source Safe

Tagged with , , , , , , , , ,


Get every new post delivered to your Inbox.

%d bloggers like this: