tags:

views:

1948

answers:

6

Plz let me know how to convert a .cs file to .dll file. I'm very new to this area. help me out.

best regards, Arun.

+4  A: 

You use a compiler. Csc.exe comes with the .NET Framework.

Check this link: http://msdn.microsoft.com/en-us/library/78f4aasd.aspx

You can also use an IDE like Visual Studio if you want the development process to be easier.

mannu
+4  A: 

You have to compile it:

csc /t:library source.cs  -> source.dll
leppie
hi leppiemy questions may b silly to u but plz let me know wat is csc.
Arun
It is the C# compiler. Follow the link provided below.
leppie
+2  A: 

Are you using Visual Studio?

If you create a Class Library project in VS, add your .cs file and then compile the project, the output will be a .dll file.

Winston Smith
A: 

Its automatically created for you when you run a build in visual studio. Check the bin folder in your project folder.

TT
Hardly automatic!
leppie
When all I do is click build in visual studio I would say it is automatic for me
TT
+1  A: 

First of all thank u all 4 ur fast reply. my project name is WA. in my bin folder after the compilation i found, 1)WA.exe 2)WA.vshost.exe 3)WA.pdb

best regards, Arun.

Arun
In project properties, change the output type of your project to CLASS LIBRARY instead of Console Application/Windows Application.
Winston Smith
Thank u Joe. I got an instruction from my reporting manager that i want to use pssnapin program. can u guide me, plz..
Arun
+5  A: 

My suggestion to you is to get a programming book for C# and Visual Studio that will teach you the basics. Programming is a fascinating field of work where you can learn the basics quite easiliy (provided you have the interest and understanding of logic), but you will need years and years to master it. I've written professional software for more than 10 years after 6 years of education in programming and software development, and I still learn new things every week.

When you ask a question like "How to convert .cs to .dll" it really tells me that StackOverflow is not nessecary the best place for you to start. Get a good neewbie programming book ;)

Unless of course you need to compile some premade source code to a dll, and never worry about why or how the source code produced that particular dll :)

Good luck

sindre j
That's great but how does this help him answer his question?
Winston Smith
I think the issue is that the original poster didn't even bother to spend 5 seconds searching Google to see if there was a good description on how to do this. As Sindre pointed out, many C# books will tell you how to do this.
Pretzel
Hi Joe, I think he needs more help than just an simple answer to his question. The fact that he needs to compile the cs file was already correctly answered several times, and I see no point in repeating what others already said. My answer was just a friendly suggestion :)
sindre j
Thanks a lot Sindre. Thank u for ur kind suggestion. Bt wat the actual problem is i'm not going to work on c# anymore. I'm jus doing a free tool. 4 which i'm blinking. Anyway thanks a lot man, i wud like to keep in touch with u all people. Hav a very wonderful day.
Arun
Great answer, everyone should teach someone how to fish if it looks like they could use a lesson.
Ed Griebel
Beeing sarcastic ed ?
sindre j