By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,710 Members | 1,601 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,710 IT Pros & Developers. It's quick & easy.

VS2005 reference issue/change/bug

P: n/a
WXS
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
Aug 24 '06 #1
Share this Question
Share on Google+
4 Replies


P: n/a
"WXS" <WX*@discussions.microsoft.comwrote in message
news:09**********************************@microsof t.com...
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
Aug 24 '06 #2

P: n/a
WXS
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.
"Alan Pretre" wrote:
"WXS" <WX*@discussions.microsoft.comwrote in message
news:09**********************************@microsof t.com...
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
Aug 25 '06 #3

P: n/a
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


"WXS" wrote:
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
Sep 8 '06 #4

P: n/a
WXS
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.

"Ciaran O''Donnell" wrote:
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


"WXS" wrote:
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
Sep 8 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.