0

I'm Actually using Visual Studio 2010. This is the first time I would like to test the Manager and Data persistence Class for my project using MSTest. I used DataSets to persist my data in the database and I wrote some Manager to simplify my work. So, I added a Test Project to check for the Manager if it's work correctly. But the problem I cannot add a reference to the project test : The project list is Empty. I tried to add the Test Project in my Project Folder and Outside the Project Folder but is the same problem.

1
  • please don't use exclamation points at the ends of sentences. Use periods instead. Commented May 26, 2011 at 16:05

2 Answers 2

2

Your data persistence and business logic classes should be in separate class libraries. You can then unit test those libraries.

You should also avoid the use of web site "projects". Use web application projects instead - just use File->New Project instead of File->New Web Site. Web site "projects" are unlike every other kind of project in Visual Studio, and should only be used for the simplest development scenarios.

Using unit tests makes them not simple any more.

Sign up to request clarification or add additional context in comments.

2 Comments

Thank you John. I think that is the problem. But, do you have any idea to convert or transform the web site project into an WebApplication project ?
Yes. Create a new web application project. Copy the files from the old project into the new one. Click the "show all files" button in the Solution Explorer toolbar. Select all of the missing files, right-click and choose "Include in project".
2

Check your target frameworks - it could be that your test project and your library projects are using different versions of .NET Framework...

1 Comment

Thank you. But the MSTest and the Project are using the same Framwork version.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.