Visual Studio 2012 upgrade from 2010

First some tips from Scott Hanselman to get the look-and-feel back.
Visual Studio 2012 Color Theme Editor

Next to replace the pre- and postbuild macro with an add-in. The template takes care of the plumbing and running/debugging will make it available for use.
Visual Studio Add-in
Make sure to save the BuildEvents and SolutionEvents in a classlevel variable or the events will not work.

private BuildEvents _buildEvents;
private SolutionEvents _solutionEvents;
public void OnConnection(object application, ext_ConnectMode connectMode, object addInInst, ref Array custom)
{
   _applicationObject = (DTE2)application;
   _addInInstance = (AddIn)addInInst;
   // save the SolutionEvents object to get events working
   _solutionEvents = _applicationObject.Events.SolutionEvents;
   _solutionEvents.Opened += _solutionEvents_Opened;
   // save the BuildEvents object to get events working
   _buildEvents = _applicationObject.Events.BuildEvents;
   _buildEvents.OnBuildBegin += BuildEvents_OnBuildBegin;
   _buildEvents.OnBuildDone += BuildEvents_OnBuildDone;
}

Open your solution and everything just works. Except for things that don’t because they’re to old like Silverlight 3. But there is always the round tripping feature.

About erictummers

Working in a DevOps team is the best thing that happened to me. I like challenges and sharing the solutions with others. On my blog I’ll mostly post about my work, but expect an occasional home project, productivity tip and tooling review.
This entry was posted in Tooling and tagged , , , , , , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.