Host multiple User Controls in single Assembly

1) I have created 2 user controls (2 different solutions)
2) Namespaces are "MyUserControl.UserControlA" and "MyUserControl.USerControlB"
3) I want to create one single assembly "MyUserControl.DLL" which will host these two User Controls
4) If user want to use them first he will give the reference of "MyUserControl.DLL" in his project
5) After that depending on which usercontrol user wants to use he will write following code lines
    a) using MyUserControl.UserControlA           OR
    b) using myUserControl.UserControlB

(NOTE: I know that it can be done using CSC utility using -t option, but i am not able to use it)
LVL 2
patilmmilindAsked:
Who is Participating?
 
Bruce_1975Connect With a Mentor Commented:
So this sentence is a littel confusing:
'(NOTE: I know that it can be done using CSC utility using -t option, but i am not able to use it)'


Maybe this tutorial will help:
http://www.codeproject.com/KB/dotnet/mergingassemblies.aspx

Regards,
Bruce
0
 
Bruce_1975Commented:
You can add an existing item to a solution.
- right-click on the project
- Add -> Existing item
- browse to the other solution and add the files

Regards,
Bruce
0
 
patilmmilindAuthor Commented:
Hi Bruce, i have already tested it but it is not happening. It is adding only one User Control in the assembly.
0
Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

 
Bruce_1975Commented:
???
You can repeat this to add as many controls as required. Or missed I something?

Regards,
Bruce
0
 
patilmmilindAuthor Commented:
Hi Bruce,
See, i have created one Blank Solution, and added both control's projects to it. Now the solution contains 2 projects (means 2 User Controls). Inside propery of the Solution, i selected multiple startup option. But after compiling this solution, there is only one user control is present in the assembly generated after compilation.
0
 
Bruce_1975Commented:
OK,
now i got the point! Each project will be compiled to it's own dll. To have both controls in one dll, they have to be in the same project.

Regards,
Bruce
0
 
patilmmilindAuthor Commented:
Yes you are right.
0
 
Bruce_1975Commented:
You also can add an existing item to a project... same way as shown in the first post

Regards,
Bruce
0
 
patilmmilindAuthor Commented:
Hi,
You are right. But i want to do it using IL.exe or csc.exe. Something like Merging Assemblies.
0
 
patilmmilindAuthor Commented:
Hi Bruce,

Thanks a lot for the link provide. I was confused with CSC utility. This tutorial is very helpful. I am going to accept your question. One more thing in which i am interested is GUI tool for CSC.

0
 
patilmmilindAuthor Commented:
This solution looks useful. According to my requirements, i need to do more R & D on it.
0
 
Bruce_1975Commented:
have a look at the tutorials comments and you will find something ;o)

Regards,
Bruce
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.