The OutputPath property is not set for this project - interesting

M

MobileMan

Thought I would pass along this general comment for all those developers who
have run into this exception when attempting to build a multi-project
solution ..... The OutputPath property is not set for this project. Please
check to make sure that you have specified a valid Configuration/Platform
combination. Configuration='' Platform='AnyCPU'

We have a large solution that is comprised of over dozen related projects.
Because of some early decisions (that need to be refactored) we have circular
dependencies between several of those projects. As everyone knows, this is
generally frowned upon, although, sometimes a neccessary evil.

When choosing to "Add Reference" for a project we would normally click on
the "Projects" tab and simply choose the related project we want to
reference. For whatever reason when we completed installing VS 2008 (this is
on a box that already has VS 2005, and now has both versions installed in a
"side-by-side" setup) I tried to change some code and re-build the project.
I immediately got this exception on ALL my projects in the solution.

I noticed that I could go into various (randomly selected) classes and the
class signature ..... public partial class CCC : BBB, AAA ..... the "BBB" or
the "AAA" would be in black text instead of its usual green (this indicates
that the class or interface is no longer visible ....... a reference issue).

What makes this interesting is I checked my referencs and they all showed
"good" (meaning, none of them had the little yellow "X" indicating that
assembly is no longer visible).

The Answer: the solutin turned out to remove any reference that has
circular dependencies, and add the reference back in again, but to select the
assembly explicitly by using the "Browse" tab and surfing to the desired
assembly and selecting it (versus using the "Projects" tab and selecting it
by project name).

All of a sudden, everything compiles again and the exceptions are gone. Go
figure.
 
S

Simon Hart [MVP]

This is a known bug in VS 2005 (hoping it is fixed in VS 2008). Not sure how
you received it as a result of installing VS 2008 though. Usually you get
this when adding a project reference to your main project then unchecking the
build flag in the "Configuration Manager" for the referenced project output.
 
M

MobileMan

I ran into this one time before when installing Compact Framework SP1 (maybe
2 ... can't remember which one ....). After the installation was complete, I
did some work; attempted to compile it, and received the same errors.

Around here we put in 70 - 100 hour work weeks, so I'm a bit "fuzzy" on what
was neccessary to clear these errors back then. I'm just glad I stumbled
accross the solution quickly this time ... I hate exceptions that appear to
mask the real problem and act as a false target. Frankly, I'm not sure if
this was the "problem," and as such I'm not sure if this the correct
solution. I'm just glad to be up and running again.

Thanks Simon.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top