Category Archives: Visual Studio

What i dislike about the Web.config Transformation in VS2010

There are a couple of things that i strongly dislike about the Web.config transformation in VS2010: Only works with XML files (eg: Can’t be used to generate a release notes.txt file) Does not seem to support externalized sections, eg: log4net.config … Continue reading

Posted in MSBuild, Visual Studio | Leave a comment

Add “Run as administrator” to .sln files

Another trick i learned from the “How-To Geek” is how to add a “Run as administrator” option in the windows shell for .sln files which makes life considerably easier AddRunAsAdministratorToSlnFilesInShell.reg.txt AddRunAsAdministratorAsDefaultToSlnFilesInShell.reg.txt

Posted in Visual Studio | Leave a comment

MSTEST tip: Add ‘Full Class Name’ column to results view

I firmly believe that adding the ‘Full Class Name’ column to MSTEST’s result view makes it a lot easier to clarify the requirements:

Posted in Visual Studio | Leave a comment

About the design of a fluent interface

Now that i have presented a simple ControlStateMachine i can raise the bar a little. A statemachine that handles commands. Here is how a developer should be able to initialize this machine: sut.WhenIn(States.Loading) .On(Commands.Next) .Do(() => Console.WriteLine("got next command while … Continue reading

Posted in C#, Visual Studio | 2 Comments

VS2010: Unable to insert a breakpoint by clicking next to the line number

For some reason i was unable to insert a breakpoint by clicking next to the line number in VS2010. Anyway, here is the trick that made the problem disappear for me: Go to “Tools > Import and export settings… ” … Continue reading

Posted in Visual Studio | 1 Comment

Another reason for not using mstest

As you can read in CA1001: Types that own disposable fields should be disposable. Pretty solid advice, but for some reason the mstest runner does not dispose of classes that implement IDisposable. A possible workaround is to apply a TestCleanupAttribute … Continue reading

Posted in C#, Visual Studio | Leave a comment

Presenting MyTestRunner

Here are a couple of reasons why i dislike the Unit Testing Framework that comes with Visual Studio Team System: Not all versions of Visual Studio are capable of running the tests. Test inheritance is not supported. Running tests via … Continue reading

Posted in C#, Visual Studio | Leave a comment

Revisited the int and string ValueObject templates

After reading The Compare Contract last week i realized that my templates for int and string ValueObjects did not comply with the contract so i decided to add a unittest that reproduces the faulty behavior (and then corrected the implementation): … Continue reading

Posted in C#, Visual Studio | Leave a comment

Presenting templates for int and string ValueObjects

Most ValueObjects that i have implemented were wrappers around an int or a string. Apart from the domain specific rules, there is a lot of repetitive work in implementing operator overloads, IEquatable<T>, IComparable<T>, … Thus i decided to create a … Continue reading

Posted in C#, Visual Studio | 1 Comment

Visual Studio 2008 (SP1) crashes when opening ViewPage in designer

Visual Studio 2008 (SP1) crashed every time i tried to open a ViewPage with the Web Form Editor (designer). Kudos go to eniac who suggested the removal of the Power Commands add-in. This made the crashes disappear.

Posted in Visual Studio | 1 Comment