Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Host multiple User Controls in single Assembly

Posted on 2008-06-11
12
491 Views
Last Modified: 2013-12-17
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)
0
Comment
Question by:patilmmilind
  • 6
  • 6
12 Comments
 
LVL 6

Expert Comment

by:Bruce_1975
ID: 21758603
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
 
LVL 2

Author Comment

by:patilmmilind
ID: 21758699
Hi Bruce, i have already tested it but it is not happening. It is adding only one User Control in the assembly.
0
 
LVL 6

Expert Comment

by:Bruce_1975
ID: 21758818
???
You can repeat this to add as many controls as required. Or missed I something?

Regards,
Bruce
0
Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

 
LVL 2

Author Comment

by:patilmmilind
ID: 21758852
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
 
LVL 6

Expert Comment

by:Bruce_1975
ID: 21758892
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
 
LVL 2

Author Comment

by:patilmmilind
ID: 21759197
Yes you are right.
0
 
LVL 6

Expert Comment

by:Bruce_1975
ID: 21759241
You also can add an existing item to a project... same way as shown in the first post

Regards,
Bruce
0
 
LVL 2

Author Comment

by:patilmmilind
ID: 21766633
Hi,
You are right. But i want to do it using IL.exe or csc.exe. Something like Merging Assemblies.
0
 
LVL 6

Accepted Solution

by:
Bruce_1975 earned 100 total points
ID: 21766776
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
 
LVL 2

Author Comment

by:patilmmilind
ID: 21767286
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
 
LVL 2

Author Closing Comment

by:patilmmilind
ID: 31466082
This solution looks useful. According to my requirements, i need to do more R & D on it.
0
 
LVL 6

Expert Comment

by:Bruce_1975
ID: 21767352
have a look at the tutorials comments and you will find something ;o)

Regards,
Bruce
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VB.Net Report Printing Issue 3 53
C# bracket error 3 35
Sending receiving text messages in vb.net 15 47
Change to file doesn't show up 16 50
Flash (http://en.wikipedia.org/wiki/Adobe_Flash) has evolved over the years to where it has become a masterful tool for displaying content screen.  It has excellent layout placement, UI precision as well as rendering capabilities. This, along with t…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

792 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