473,396 Members | 1,712 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,396 software developers and data experts.

how can I add all referenced assemblies to the CompilerParams?

I would like to add all referenced assemblies to my new assembly wich I'm
about to "compile".

I can't get it working.

I would like to compile a new assembly that uses the original assembly + all
it's references.

Am I making any sense here? Maybe look at the code below.

Thanks

Assembly a = aClass.ClassType.Assembly;
params.ReferencedAssemblies.Clear();
AssemblyName[] names = a.GetReferencedAssemblies();
foreach (AssemblyName name in names) {
params.ReferencedAssemblies.Add(name.Name);
}
params.ReferencedAssemblies.Add(a.FullName);
}
Nov 17 '05 #1
1 1812
Found the sollution on

http://www.microsoft.com/belux/fr/ms...cewrapper.mspx

thanks

"Freddy Willockx" <as*@hotmail.com> wrote in message
news:uE*************@TK2MSFTNGP15.phx.gbl...
I would like to add all referenced assemblies to my new assembly wich I'm
about to "compile".

I can't get it working.

I would like to compile a new assembly that uses the original assembly +
all it's references.

Am I making any sense here? Maybe look at the code below.

Thanks

Assembly a = aClass.ClassType.Assembly;
params.ReferencedAssemblies.Clear();
AssemblyName[] names = a.GetReferencedAssemblies();
foreach (AssemblyName name in names) {
params.ReferencedAssemblies.Add(name.Name);
}
params.ReferencedAssemblies.Add(a.FullName);
}

Nov 17 '05 #2

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

Similar topics

8
by: Bob Rock | last post by:
Hello, is there a tool around that given an assembly shows the referenced assemblies??? Any code snippet to do this programmatically??? Regards, Bob Rock
4
by: Jimi | last post by:
Given a C# project file path, can I use reflection to get all the assemblies referenced by the project? e.g., I know the path of a C# project, say, "c:\SomeProject.csproj", and I want to load...
1
by: Jimi | last post by:
(Sorry for the repost, but I thought maybe I'd have better luck this time) I'm working on a utility to provide an overview of one's .NET projects and one of the things I want to display is...
2
by: BH | last post by:
My question may be a bit odd. Right now I can see that all referenced assemblies in my project are compiled into the application assembly so when I deploy the application, I don't see those...
1
by: Bob | last post by:
For an assembly I manually load from a file, this code snippet: For Each t As Type In asm.GetTypes 'do something Next generates this error message: ...
3
by: Steve Long | last post by:
Hello, can anybody tell me what the trick is to getting VB.NET 2003 to step into the code of an assembly that I have referenced in my project? For instance, I have these two assemblies, both...
1
by: Omatase | last post by:
Here is my code: CDO.Message iMessage = new CDO.MessageClass(); string sFrom; string sDate; iMessage.DataSource.Open(bstrURLItem,null, ADODB.ConnectModeEnum.adModeRead,...
0
by: lbolognini | last post by:
Hi all, How do i get a list of all cross-referenced assemblies starting from a foo.dll? i'd like to have a unique list of all the assemblies dependant on foo.dll and of all the assemblies that...
0
by: mahendra dubey | last post by:
Hi There I want to get all referenced assembly of a Project.While googling I found two way of doing this... 1)Assembly.GetEntryAssembly().GetReferencedAssembly() but problem with that...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.