473,320 Members | 1,841 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Automatically adding dependents of an assembly to the project

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.

May 7 '07 #1
2 1586
ACA
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" <ep****@gmail.comwrote in message
news:11**********************@q75g2000hsh.googlegr oups.com...
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.
May 7 '07 #2
On May 7, 11:00, "ACA" <Andre.Achtermeier_AT_prodot.dewrote:
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.

May 7 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Wysiwyg | last post by:
Is there any way to add an embedded resource to a project without copying it to the project's directory? I have shared resources and don't want each project using the images, xml files, etc. to...
6
by: cpnet | last post by:
I've authored a custom web component (a non-ui component kinda like a DataSet) and so far it's working. When my web component is added to the web form in the designer from the toolbox, the...
18
by: Praveen Ramesh | last post by:
Hi, Is there any way to add the @Assembly reference to the aspx files programmatically from inside a custom control (when it gets dropped on to the page from the toolbox)? I have a custom...
4
by: Bob | last post by:
Is it possible to have a DLL automatically include references to other DLL's that it depends upon when it is added to a project? Bob
2
by: Ron M. Newman | last post by:
Hello .NET Sages, Question. What is the meaning of adding say, an XML file to a project, next to a .CS file (not that it matters). Does that mean the XML file becomes a part of the compiled...
1
by: Jedufa | last post by:
following of thread: "Adding namespaces to code behind automatically" Hello, I had quite the same problem and got further in the right direction with your suggestions, thanks. Nevertheless, I...
8
by: Jason | last post by:
Hello, I am trying to utilitze the AJAX Control toolkit in my asp.net project. I have added a reference to AjaxControlToolkit.dll, and in my page, added these lines of code: ...
5
zachster17
by: zachster17 | last post by:
Hi everyone, First of all, sorry for the massive amount of SQL I am about to type. I have a database that has a "lives" table of insured employees and then another table (that links to the lives...
12
by: Jeff Gaines | last post by:
I am a hobbyist programmer, using C# and VS2008 and writing desktop apps. I am trying hard to take a modular approach to avoid re-inventing the wheel but I'm finding it a bit frustrating. For...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.