Referencing main project from unit test project

ElrondCT
ElrondCT used Ask the Experts™
on
In Visual Basic 2008, I have created a project for unit tests (working off a database of test data). I was running into some compilation problems caused by it, so I temporarily removed the project from the solution. I'm now ready to reinstate the project, but when I brought it back into the solution, I found that the links between it and the main application project aren't working, and all references to the primary namespace are giving a "not defined" or "not declared" error. The executable is listed in the project's references listing, but it doesn't show up beneath in the available namespaces to import; when I try to Add Reference and select the main project, nothing seems to happen. The project build order has the unit test project last, and it is marked with dependencies on the main project.

It should perhaps be noted that the primary project name is not the same as its namespace; this is because I have two versions of my application, the production and the development versions, and the namespace is the same but the development version has a different project & solution name. For the production version of the solution, the references are working correctly.

Any suggestions for what I'm missing to get the unit test project to see the primary project?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Very difficult to say what's going on in this case without really seeing it. Have you tried deleting all existing references from the test project, and then adding those again?

Commented:
Also, you may try removing the existing reference, cleaning the solution and then re-adding the reference.

-saige-
Jeevan, your suggestion worked. I don't know why I didn't think of that! Thanks.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial