Friday, 4 February 2011

VS2010: How to change a "Class Library" project into a "Test Project"

Whilst working with VS2010 projects it can be really frustrating if you accidently create your unit testing projects as class libraries (or migrate an existing class library into a unit testing library mainly because the context sensitive "Add New" menu no longer contains the "New Test" option.  This can be easily fixed by directly amending the project file, adding the following key to main tag:


Reload the project in VS2010 and now your class library has become a testing library and you have "Add New Test" option(s) back again.

No comments:

Post a Comment