Link to home
Start Free TrialLog in
Avatar of ElrondCT
ElrondCTFlag for United States of America

asked on

Referencing main project from unit test project

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?
ASKER CERTIFIED SOLUTION
Avatar of Jeevan Bordoloi
Jeevan Bordoloi
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of it_saige
Also, you may try removing the existing reference, cleaning the solution and then re-adding the reference.

-saige-
Avatar of ElrondCT

ASKER

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