Gotchas Upgrading C# Projects to Visual Studio 2012


My previous post is about my experience developing for Windows 8 RTM using Visual Studio 2012, there were BREAKING changes with Visual Studio 2012 and I feel obliged to map my own efforts for the benefit of other developers. So I’m going straight to the topic. Most of the content is NOT from my own experience, I put them down here to compile the gotchas.

Everything you see here is actually available as a whitepaper published by Microsoft here.

From Shai Raiten’s excellent guide here, find and replace all namespaces found below to the value on its right:

TypeOld ValueNew ValueComment
ClassPointerEventArgsPointerRoutedEventArgs
StyleFocusVisualBlackStrokeBrushFocusVisualBlackStrokeThemeBrush
StyleFocusVisualWhiteStrokeBrushFocusVisualWhiteStrokeThemeBrush
StyleApplicationHoverTextBrushApplicationPointerOverForegroundThemeBrush
StyleApplicationPressedTextBrushApplicationPressedForegroundThemeBrush
StyleControlDisabledTextBrushButtonDisabledForegroundThemeBrush
StyleApplicationSecondaryTextBrushApplicationSecondaryForegroundThemeBrush
StyleAppBarItemForegroundBrushAppBarItemForegroundThemeBrush
StyleAppBarItemBackgroundBrushAppBarItemBackgroundThemeBrush
StyleAppBarItemHoverBackgroundBrushAppBarItemPointerOverBackgroundThemeBrush
StyleAppBarItemHoverForegroundBrushAppBarItemPointerOverForegroundThemeBrush
StyleAppBarItemForegroundBrushAppBarItemForegroundThemeBrush
StyleAppBarItemPressedForegroundBrushAppBarItemPressedForegroundThemeBrush
StyleAppBarItemDisabledForegroundBrushAppBarItemDisabledForegroundThemeBrush
StyleBackButtonBackgroundBrushBackButtonBackgroundThemeBrush
StyleBackButtonGlyphBrushBackButtonForegroundThemeBrush
StyleBackButtonPressedGlyphBrushBackButtonPressedForegroundThemeBrush
StyleBackButtonHoverBackgroundBrushBackButtonPointerOverBackgroundThemeBrush
StyleBackButtonHoverGlyphBrushBackButtonPointerOverForegroundThemeBrush
StyleBackButtonGlyphBrushBackButtonForegroundThemeBrush
StyleListViewItemPlaceholderRectBrushListViewItemPlaceholderBackgroundThemeBrush
StyleListViewItemOverlayBackgroundBrushListViewItemOverlayBackgroundThemeBrush
StyleListViewItemOverlayTextBrushListViewItemOverlayForegroundThemeBrush
StyleListViewItemOverlaySecondaryTextBrushListViewItemOverlaySecondaryForegroundThemeBrush
Methodthis.Dispatcher.InvokeAsync(this.Dispatcher.RunAsync
My own additions:
TypeOld ValueNew Value
XAMLVerticalScrollMode="Rails"IsVerticalRailEnabled="True"
If you also wanna help with your experience, please leave a comment and I will update the list accordingly.