Articles tagged with Visual Studio Tips

Suppressing CA1062 with a Helper Function

By Eric — 4 minute read

I think Visual Studio's static analysis warning for checking parameters for null before they are used is generally a good idea, but the code to check the parameters can get really tedious.

Before addressing the tedium, though, why does it even matter whether you check for null arguments and throw …

Read more...

This solution contains a web site...

By Eric

I kept getting a message from Visual Studio 2008 when opening a solution saying:

This solution contains a web site at 'http://localhost/Services'. There is already a web site at this location on this computer. Do you wish to use this existing location for your web site (existing files …

Read more...

Converting from Visual Studio 2005 to Visual Studio 2008

By Eric — 3 minute read

I've just finished switching over our development environment from Visual Studio 2005 to Visual Studio 2008 (except for a C++ solution that uses boost, which will take some further effort). These are the things that I needed to do, and the gotchas I encountered.

  1. Getting installed - Aside from being a …

Read more...

Automatic Test Cleanup in VS 2008

By Eric

I'm working on switching from VS 2005 to VS 2008. I just tried running some unit tests and got the following dialog:

clean-up-tests.jpg

Hooray! I've been trying to figure out how to implement automatic test cleanup myself, but I (fortunately) hadn't had time to devote serious effort to it. Up to …

Read more...

Remote Debugging

By Eric — 3 minute read

"It works on my machine" is not a very solid defense. And when something baffling is happening in your code on a non-development machine, and logging doesn't give enough clues, it can be a good time to take advantage of remote debugging.

In the past I've equated remote debugging to …

Read more...

XP Common Controls with VC++ 2005

By Eric — 1 minute read

This morning I was asked to enable the Windows XP visual styles for our application. No problem -- I've done that for applications many times. Just drop the appropriate manifest file in the right place, call InitCommonControls and all should be well. When I tried that this morning, though, I got …

Read more...