Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Create a DLL file in Visual Studio C# 2010 Express edition?

I have already come across the Stack Overflow question "Is there a way to generate a DLL file from Visual Studio Express without explicitly creating a DLL project?", but it does not directly answer my query, so I'm raising it here.

The problem I am facing while trying to make the DLL is that I can't find any option under Build named build class file. I have changed the project property to class file (shown below)

This is how it is:

And here is how my build option is getting displayed:

Also when I am using the command-line option the dll file is getting generated but it is not getting the properties I'm setting in the application.

I am new with Visual Studio so a litte bit confused about this part.

like image 389
Rabimba Karanjai Avatar asked Dec 10 '22 02:12

Rabimba Karanjai


1 Answers

The "Build Solution" option in your second screenshot is the thing you need to click to produce your dll, alternatively you can right click on your project in the Solution Explorer and click "Build":

Screenshot of the context menu in the Solution Explorer

(If you only have one project in your solution then these two will both do exactly the same thing)

The output dll will normally be placed in the bin\Debug or bin\Release directory depending on whether you are in Release or Debug configuration, check the "Build" tab of the project properties for the exact path.

The reason why you aren't seeing a "Build class file" option is because this is what the "Build project" menu item does - it will produce a class library if the project output type is "Class Library", a windows executable if the project output type is "Windows Application" etc...

like image 72
Justin Avatar answered Apr 13 '23 00:04

Justin