How to compile / build a DLL?

1

I made a program in C # in Visual Studio 2017, but by default, when I compile the code, it creates a .exe file, but I would like the code to compile a .dll file. How can I do this?

Example:

I created a program called ccleaner .

When I press CTRL + SHIFT + B (command to compile the project), it creates an executable in the following directory:

C:\Visual Studio 2017\Projects\ccleaner\ccleaner\bin\Debug\ccleaner.exe

But what I want to create is:

C:\Visual Studio 2017\Projects\ccleaner\ccleaner\bin\Debug\ccleaner.dll
    
asked by anonymous 29.07.2017 / 18:36

1 answer

1

You need to create a project of type ClassLibrary

Inanexistingproject,youcanchangetheoutputtypeintheprojectproperty:

And yes, when compiling, a dll will be generated

    
29.07.2017 / 18:42