Visual Studio

Visual Studio

Making Productivity Power Tools for Visual Studio 2010 play nicely with ReSharper

Scott Guthrie wrote about VS 2010 Productivity Power Tools update, and I went to the Extensions Gallery to download it. I won’t write an overview about it – Scott has already done an excellent job on his blog. You can also find more information on the extension’s page. If you’re a ReSharper addict (like me), you will notice that some things just do not work or interfere with the way ReSharper does things. So here’s a list of things that you can do to make ReSharper and the Productivity Power Tools work nicely together: 1. Go to the Productivity Power Tools under...

Visual Studio 2010 bug: NullReferenceException when opening any file, caused by a docked add-in tool window

Here’s an issue I’ve been struggling with: it seems that by accessing a certain property of a docked tool window of an add-in, an exception is thrown somewhere inside Visual Studio 2010. It’s caught internally, and the exception message, “Object reference is not set to an instance of an object”, is shown whenever I was trying to open any file (code or otherwise). Here’s the offending code (this OnConnection method belongs to a C# Add-in code, it’s pre-generated when you create a new Add-in for Visual Studio): public void OnConnection(object application, ext_ConnectMode connectMode, object addInInst, ref Array custom){ _applicationObject = (DTE2)application;...

Smart Paste Add-In for Visual Studio 2008

Say you need to paste a chunk of XML (or WKT) into Visual Studio as a string literal (for your unit tests, or what not). How would you do it? In C# string literals can be represented in two ways: C# supports two forms of string literals: regular string literals and verbatim string literals. A regular string literal consists of zero or more characters enclosed in double quotes, as in "hello", and may include both simple escape sequences (such as \t for the tab character) and hexadecimal and Unicode escape sequences. ...

Awesome tip: make View Code default double click action on a WinForm control

Here is something I wish I'd known years ago - you can make the "View Source" action default when you double click on a WinForm control. Here's how: Right click any Form/UserControl file, and choose Open With… Select CSharp Editor, then press Set as Default ???? Profit! That's it! Now you won't break the keyboard when you accidentally double click on your MainForm.cs file.

«September»
SunMonTueWedThuFriSat
2930311234
567891011
12131415161718
19202122232425
262728293012
3456789