How to convert a test project to a normal class library

Sometimes you make mistakes. One of the ones I make most often while using Visual Studio is creating a new project of the wrong type. Usually, creating using just the same one I usually created.

And just now, I added a unit test project to a project I was working on. Great, so that’s one job done. Now I needed to add the class library it was going to test – and added another unit test library. Doh!

Turns out this is fixable – simply edit the project file (the “Productivity Power Tools” extension provides a shortcut to this, if you don’t have it already) and remove the line:
then save and reload the project – which turns out to be easier than I thought.

Can’t claim I invented this trick – I found it the other way round on Adam Prescott‘s blog. But I’m putting it here because I know I’ll forget it, next time I need it.

This entry was posted in Development and tagged , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.