0

i am migrating my old code from VB6 to .net(C#). after rewriting code modules and testing them now started making my application.

i have multiple projects in my solution( Like Framework ). compiler giving Dll files for each project. i want to merge all projects in to one project so that i can use one Dll file. How to do that.

My Project Details :

Project 1 : Windows Application ( which uses all Class Library references)

Project 2 : Class Library Assembly Name : MyApp.UI.Design
Project 3 : Class Library Assembly Name : MyApp.UI.Design.Themes
Project 4 : Class Library Assembly Name : MyApp.UI.Design.Controllers
Project 4 : Class Library Assembly Name : MyApp.UI.Design.xyz

and so on....
total 27 class Library Projects

  • Default NameSpace : MyApp.UI for all Class Library Projects in different locations.

I am using them by adding reference to them in my Application.
I want to merge all Class Library projects into One Project so that i can use only one Dll file instead of multiple Dll Files.

Detailed Code Sample Project or Code Snippet how to do - will be appreciated.

Community
  • 1
  • 1
Media Hub
  • 1
  • 1
  • 4
  • Create a project named **MyApp.UI** and create one folder for each project you want to merge, in your example i'd create this 4 folders: **Design**, **Design.Themes**, **Design.Controllers** and **Design.xyz**. – Facundo La Rocca Dec 05 '16 at 01:42
  • Then put each class in its respective folder with its respective namespace. – Facundo La Rocca Dec 05 '16 at 01:48
  • But what about Assembly Name how to configure Assembly and namespace. in this scenario you described about making folder but what about namespace and base assembly – Media Hub Dec 05 '16 at 02:33
  • Creating a single project will produce a single assembly. Miltiple namespaces can exist into a single assembly. If your project is named MyApp.UI, the dll related will be called as well. – Facundo La Rocca Dec 05 '16 at 02:40
  • In one hand you have the phisical distribution and libraries, in this case it is the MyApp.UI assembly, on the other hand you have the logical distribution, It is composed by your namespaces and folders and clases. I'm guessing that what you want is to join 4 separated dlls into one, isnt it? – Facundo La Rocca Dec 05 '16 at 02:43
  • What if Some Don't Modules Don't Have Same Base NameSpace – Media Hub Dec 05 '16 at 02:44
  • In that case dafault namespace will be the name of the project/assembly – Facundo La Rocca Dec 05 '16 at 02:46
  • actually not only 4 total 27 right now few are with same Base NameSpace few are 2 different base names – Media Hub Dec 05 '16 at 02:47
  • is there any examples available online for reference, i tried to search but not found even one – Media Hub Dec 05 '16 at 02:50
  • Ok, If the some dlls share namespace there is no problem, the problem will raise if you find two (or more) classes with the same name! In that case there isn't a simple solution. Add to the questions some examples of what the structure is – Facundo La Rocca Dec 05 '16 at 02:50
  • is there any online reference projects or documents to check. still little bit confused. – Media Hub Dec 05 '16 at 03:06

0 Answers0