VS2005 reference issue/change/bug

G

Guest

In a case you have Project/Assembly A references Project/Assembly B which
References Project/Assembly C.
Let's say Project A needs be and references it directly. Unknown to A, B
needs project C's assembly but it uses C's assembly dynamically (Load
Assembly).

Even with copy Local set on all references Project A when built will get
project B's output but not project C's.

This is from what I hear due to an "enhancement" in VS2005, that if a
reference is not directly used it is not copied (even regardless of copy
local setting).

Some would say a work around to this is to add C's reference to A. We would
call that a hack, as we don't want Project A to have to directly know about
project C.


Is there some workaround that we can revert back to the old way for
references? Is this a bug in VS2005 or was this supposed to be a feature.
You wouldn't think that the project should ignore the copy local flag.

Thanks
 
A

Alan Pretre

WXS said:
In a case you have Project/Assembly A references Project/Assembly B which
References Project/Assembly C.
Let's say Project A needs be and references it directly. Unknown to A, B
needs project C's assembly but it uses C's assembly dynamically (Load
Assembly).

Even with copy Local set on all references Project A when built will get
project B's output but not project C's.

Even though B loads C dynamically, can't you add a reference to C in B's
project?

-- Alan
 
G

Guest

We did add the reference to C from B. A just has a reference to B though. In
VS2003 A,B, and C assemblies would end up in the output directory. But in
VS2005 just A and B end up in the output directory not C. Then as I said if
you explicitly add the reference from A to C that works but we don't consider
that a viable solution since it breaks usage encapsulation. A shouldn't have
to know that B uses C.
 
G

Guest

In the solution explorer, right click on Project B and select 'Project
Dependancies'
When the list of projects comes up, select project C. This will make sure C
is always built before B and I THINK, will make C's output tag along with B's

If not, build them all to a common folder, then they will all be together.
If you have the MSDN installed the url for article is:
ms-help://MS.VSCC.v80/MS.MSDN.v80/MS.VisualStudio.v80.en/dv_vsbuild/html/1fcc2c48-07cb-4c4f-9556-36945e7dfc4e.htm


HTH

Ciaran O'Donnell
 
G

Guest

Project C might be a binary reference so I don't know if dependency available.

Yes output to the same directory might be a workaround, but the real
question is, is there a way to go back to the VS2003 way of references since
that was a much better solution, it just worked.
 

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