PC Review


Reply
Thread Tools Rate Thread

Copy Local and GAC

 
 
=?Utf-8?B?bW9XaGl0ZQ==?=
Guest
Posts: n/a
 
      9th Nov 2005
I have an assembly that uses a third-party object that is installed in the
GAC. I set the references "Copy Local" property to true and compile my
assembly. The third-party object is in fact copied to my output directory.

I have another assembly that uses my first assembly. I set the references
"Copy Local" property to true and compile my assembly. I would expect that I
would see both my first assembly and the third-party assembly in my second
output directory, but I don't.

Why?
 
Reply With Quote
 
 
 
 
David Browne
Guest
Posts: n/a
 
      9th Nov 2005

"moWhite" <(E-Mail Removed)> wrote in message
news:6D8D7189-9256-4A64-893A-(E-Mail Removed)...
>I have an assembly that uses a third-party object that is installed in the
> GAC. I set the references "Copy Local" property to true and compile my
> assembly. The third-party object is in fact copied to my output
> directory.
>
> I have another assembly that uses my first assembly. I set the references
> "Copy Local" property to true and compile my assembly. I would expect
> that I
> would see both my first assembly and the third-party assembly in my second
> output directory, but I don't.
>
> Why?


Because "Copy Local" is not recursive. Just set a direct reference from the
other project to the Third-Party project, and it will be copied too.

With Assemblies A,B and C
A --references--> B --references--> C

When you build A, B will be copied but C will not. But you can always add a
direct reference from A to C just so the Visual Studio can keep track of the
dependency and copy C into A's bin directory on build.

David


 
Reply With Quote
 
=?Utf-8?B?bW9XaGl0ZQ==?=
Guest
Posts: n/a
 
      10th Nov 2005
Wow, I've been doing this .NET stuff since the beginning and I did not know
that.

I'm trying to confirm what you are saying right now, but can you point me to
an MSDN Library explaination of this?

Thanks, Richard


"David Browne" wrote:

>
> "moWhite" <(E-Mail Removed)> wrote in message
> news:6D8D7189-9256-4A64-893A-(E-Mail Removed)...
> >I have an assembly that uses a third-party object that is installed in the
> > GAC. I set the references "Copy Local" property to true and compile my
> > assembly. The third-party object is in fact copied to my output
> > directory.
> >
> > I have another assembly that uses my first assembly. I set the references
> > "Copy Local" property to true and compile my assembly. I would expect
> > that I
> > would see both my first assembly and the third-party assembly in my second
> > output directory, but I don't.
> >
> > Why?

>
> Because "Copy Local" is not recursive. Just set a direct reference from the
> other project to the Third-Party project, and it will be copied too.
>
> With Assemblies A,B and C
> A --references--> B --references--> C
>
> When you build A, B will be copied but C will not. But you can always add a
> direct reference from A to C just so the Visual Studio can keep track of the
> dependency and copy C into A's bin directory on build.
>
> David
>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy local users and groups, copy shares with security, copy homeuser folders usenet@sphere10.com Microsoft Windows 2000 Active Directory 1 17th Feb 2009 01:31 PM
Copy local users and groups, copy shares with security, copy homeuser folders usenet@sphere10.com Windows Vista General Discussion 2 17th Feb 2009 01:31 PM
Local copy and Server copy do not match in Outlook 2003 =?Utf-8?B?amFzb24=?= Microsoft Outlook Discussion 1 9th May 2006 12:59 AM
Can't Copy Local Profile - "Local Security Authority cannot be contacted" Bryan Linton Windows XP Networking 2 8th Sep 2004 05:45 PM
Can't Copy Local Profile - "Local Security Authority cannot be contacted" Bryan Linton Windows XP General 0 29th Jun 2004 02:32 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:25 AM.