PC Review


Reply
Thread Tools Rate Thread

Automatically adding dependents of an assembly to the project

 
 
E-ploko
Guest
Posts: n/a
 
      7th May 2007
Hello all,

Here we have a large set of assemblies... about 250 lying around and
we have to reference them all in a project. Is there a way in
existence that'd allow us to somehow bundle them all together into a
single assembly, so when the assembly is referenced, all the
assemblies, that have been "bundled into it", get automatically
referenced in our project?

We use VS.NET 2005 and the .Net 2.0.

I've been digging this for a couple of days now and seem unable to
find the answer. Any hints or clues or whatever would be highly
appreciated.

 
Reply With Quote
 
 
 
 
ACA
Guest
Posts: n/a
 
      7th May 2007
Hi,

i do not know an automatic mechnism to do that, but a way to think about is
to register an assembly resolve event at the beginning of your code like:

AppDomain.CurrentDomain.AssemblyResolve += new
ResolveEventHandler(CurrentDomain_AssemblyResolve);

this event is raised when a dependant assembly is needed. in the handle you
can do something like this to load the assembly. But that way means you know
where to get your dependant assemblies from (location):

internal Assembly CurrentDomain_AssemblyResolve(object sender,
ResolveEventArgs args)
{
foreach (Assembly loadedAss in
AppDomain.CurrentDomain.GetAssemblies())
{
if (args.Name == loadedAss.FullName)
{
return loadedAss;
}
}

return null;
}

--
Andre Achtermeier :: Senior Consultant
www.prodot.de
"E-ploko" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hello all,
>
> Here we have a large set of assemblies... about 250 lying around and
> we have to reference them all in a project. Is there a way in
> existence that'd allow us to somehow bundle them all together into a
> single assembly, so when the assembly is referenced, all the
> assemblies, that have been "bundled into it", get automatically
> referenced in our project?
>
> We use VS.NET 2005 and the .Net 2.0.
>
> I've been digging this for a couple of days now and seem unable to
> find the answer. Any hints or clues or whatever would be highly
> appreciated.
>


 
Reply With Quote
 
Andrey Subbotin
Guest
Posts: n/a
 
      7th May 2007
On May 7, 11:00, "ACA" <Andre.Achtermeier_AT_prodot.de> wrote:

> i do not know an automatic mechnism to do that, but a way to think about is
> to register an assembly resolve event at the beginning of your code like:


Er... I forgot to say all those assemblies should be referenced at
design-time, so we get the IntelliSense magic working. The run-time
trick wouldn't help in that, I suppose. Thanks for pointing that out,
anyway.

 
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
dynamically adding assembly reference to executing assembly chage Microsoft C# .NET 8 3rd Jun 2008 09:32 PM
Adding Assembly to Global Assembly Cache =?Utf-8?B?VGVycmFuY2U=?= Microsoft Dot NET 6 14th Feb 2006 04:45 PM
adding assembly to windows\assembly through bat file Grant Merwitz Microsoft ASP .NET 3 15th Sep 2005 12:40 PM
referencing an assembly and a project which references the same assembly Christopher C. Bernholt Microsoft VB .NET 4 18th Jan 2005 11:58 AM
automatically including other references when adding a DLL to a project Bob Microsoft VB .NET 4 28th Aug 2003 12:48 AM


Features
 

Advertising
 

Newsgroups
 


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