project vs. file reference annoyance ...

  • Thread starter Thread starter Ken Onweller \(.NET MCSD\)
  • Start date Start date
K

Ken Onweller \(.NET MCSD\)

there is something abou the way projects are set up in visual studio that is
really giving me a
headache.

you have multiple projects all working together and you wish to debug
through all of them.

you create a solution and then add each project to this solution.

in order for the debugging to work properly you must remove all of the file
references from each
Project's References section (in the solution explorer) and re-add them as
Project References.

Ok, all is good.

Everything works, you do your release build and you are done.

Now you want to work on one of those single projects so you open it. Those
references you added
are now cited as broken. So you have to remove the broken references and
then re-add them as
explicit file references again before you can proceed.

This is absolutely INSANE to me.

Why the bloody heck is it that if you have a Solution with multiple projects
that the default behavior
isn't just to assume all References for projects in the Solution ARE PROJECT
REFERENCES.

I mean, guys, with this approach, everytime you want to modify a project you
would be required to
open the whole stinking solution in order to do a build or test which is not
really ideal (especially
when you have several people working on the various pieces).
 
We have a fairly large system, and we don't bother with projects that have
everything in them. To avoid the versioning conflicts that arise when you
don't ever build anything at once, we set the version on every assembly to
2.0.0.0, instead of 2.0.*.*. We build everything into one directory, and
make all references for the assembly in that directory.

Granted, the VS build system is absolutely terrible at the moment. But the
new MSBuild stuff in Whidbey (when it finally gets here) should really help
these issues some. And if you can't wait, you can look into the NAnt build
system.

Chris C.
 
ah. thanks. never thought of having each project force it's output into
this one directory
as well. that would make cross-project debugging possible too.

after doing more research on MSDN I came across a blurb which basically said
that if you
want multi-project solutions to work together then you must have project
references. if you
want to work on a standalone project then you must have a file reference.
I.e. just keep adding/removing
references based on what context you are needing the particular project in
the solution.

I sure hope Whidbey resolves this ugliness.
 
Back
Top