Click here to Skip to main content
15,903,012 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello Sir,
I have three classes in my website project named class1.cs, class2.cs and class3.cs.
These three classes are declared in the same namespace and now I want to create a DLL for these classes.
That is one DLL only.
How can I create that?
Can anybody please tell me?

Thank you!
Posted
Updated 1-Mar-11 20:37pm
v2

You'll have to create an additional project in your solution. The output type must be selected as "Class library". In order to use that in your ASP.NET project you'll need to reference your class library from the ASP.NET project.

Still have a question? Feel free to leave me a comment.

Cheers!
 
Share this answer
 
Comments
sathish.jampala 1-Mar-11 5:26am    
thanks for ur quick reply.
how to create a project in my website sir.
Manfred Rudolf Bihy 1-Mar-11 7:39am    
You must first create a solution. This solution which is in fact a collection of projects will contain your ASP.NET project and the class library project.
Sergey Alexandrovich Kryukov 1-Mar-11 13:12pm    
Sure, 5, more details in my answer.
--SA
sathish.jampala 6-Mar-11 8:15am    
thank you sir.
I recently answered a similar Question. You will find many useful details here: How can I create a DLL from my project in C# in VS2010[^].

—SA
 
Share this answer
 
Comments
Ed Nutting 1-Mar-11 14:58pm    
A good comprehensive answer though I would say a short quote from your answer would be nice :P My 4 :) Ed
Sergey Alexandrovich Kryukov 1-Mar-11 15:27pm    
Why do you think it's better?
--SA
Ed Nutting 1-Mar-11 15:30pm    
It's personal preference to be honest. If you give a short quote then the reader can see what they are being linked to and whether it is actually what they want rather than having to load a whole new page. This is especially useful if your on a slow computer or slow/costly internet connection :P Not that I'm on either any more but used to be...:P
Sergey Alexandrovich Kryukov 1-Mar-11 15:52pm    
Sure, some personal preference. But... Reuse!
--SA
Ed Nutting 1-Mar-11 15:57pm    
Yes always reuse otherwise, what's the point of having a forum ;P
To create an assembly you will need to create a project class library project. In this project you will create your reportclass.cs class file. When you build this it will produce the DLL file. Unfortuantely you cannot create web pages in this type of project.
 
Share this answer
 
Comments
sathish.jampala 1-Mar-11 5:25am    
thanks for ur quick reply.
[no name] 1-Mar-11 5:37am    
It's my pleasure to help.
Sergey Alexandrovich Kryukov 1-Mar-11 13:13pm    
This is not "unfortunately" at all. My 4.
Please, see my answer for more details.
--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900