Paulo Balbino
Paulo Balbino

Reputation: 243

Create a single "dll" starting from two independent projects (same solution)

I have a small solution with 2 projects "Class Library" independent, ie, no project is used as a reference in another.

The first project is called "Extension1" and the second "extension2". I would not want to use this solution in another project and having to reference the two dlls separately, I need to create a single dll "CustomExtension.dll" and that it has the two ("Extension1.dll" and "Extension2.dll") to reference only dll "CustomExtension.dll" on a new project using only the respective namespace. Is this possible?

PS: Windows 8 - Visual Studio 2010 Professional - C#

Upvotes: 2

Views: 2110

Answers (2)

Chris Leyva
Chris Leyva

Reputation: 3526

It seems like this could be a very tedious task. Take a look at this answer to a previous question:

https://stackoverflow.com/a/6573711/329928

You have to do that by compiling the code using csc.exe outside visual studio and passing the command-line parameters yourself (all .cs files).

This will be a bit tedious but can be done. Look here: http://msdn.microsoft.com/en-us/library/78f4aasd.aspx

Upvotes: 1

PCG
PCG

Reputation: 1207

Might want to take a look at ILMerge. We use it in a lot of our projects for combining multiple dll's into one.

http://research.microsoft.com/en-us/people/mbarnett/ilmerge.aspx http://www.microsoft.com/en-us/download/details.aspx?id=17630

Upvotes: 2

Related Questions