[Last Call] Learn how to a build a cloud-first strategyRegister Now


Create one DLL from a solution with two or more projects

Posted on 2010-01-08
Medium Priority
Last Modified: 2013-11-26
I have a solution that currently has two projects.  Each project is a class library.  When I build the solution, two DLLs are created, one for each project.  I would like to build the solution and produce one DLL that incorporates both class libraries.  Can this be done from within Visual Studio 2008 or do I need to use something like ILmerge?
Question by:Kramarich
LVL 15

Expert Comment

ID: 26235639
Put all the class in one project, don't split it into two project, If you want to produce one dll.

That is I think the simplest thing to do.


LVL 15

Expert Comment

ID: 26273410
Merging .NET assemblies using ILMerge

Accepted Solution

vb_student earned 375 total points
ID: 26274901
i don't know how to merge the files but you can combine them into one namespace. to do this go to project properties and change the root namespace to make them the same. just make sure that everything is named so that there are no duplicates.
Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments


Author Comment

ID: 26284658
Thanks all.
Jack, thanks.  I thought of combining the projects but it just bugged me that I couldn't keep separate projects and have one dll.
x77, thanks.  This might be the way I have to do this but you would think there would be a way to do this from within the VS solution.
vb student, thanks.  I tried this but I still ended up with two DLLs - unless I did something wrong.  I'll have to play around with this a little more.  Maybe two DLLs will work after all.
Thanks again everyone!

Author Comment

ID: 26285082
Update.  It turns out that using the same name for the Root namespace in each project worked for me.  It didn't give me one DLL but it did place both projects into the same root namespace which I can live with.

Author Closing Comment

ID: 31674746

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question