简体   繁体   中英

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#

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM