We help IT Professionals succeed at work.
Get Started

Referencing main project from unit test project

70 Views
Last Modified: 2016-02-24
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
This problem has been solved!
Unlock 1 Answer and 3 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE