views:

70

answers:

1

I'd like to add nunit testing to a VS2005 C# ASP.NET website project - so that I can excercise methods in the App_Code directory. It's recommended that the tests are added as a seperate assembly so that the testing code does not get delivered with the website - in this lies my question:

When I add a new project into the solution which holds the website and try to add a reference to the website project it does not show up in the projects tab - is it possible to reference a website project from another project (without having to convert the website project into a web application project)?

+1  A: 

I would recommend you to extract the classes you have in your App_Code folder and place them in a separate project. Reference that new project in your web project. You will now have a better separation of your projects and classes, and can unit test your classes separately.

Magnus Johansson