How to compile/buildar a DLL?

Asked

Viewed 1,481 times

1

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

Example:

I created a program called ccleaner.

When I squeeze 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

1 answer

2


You need to create a Classlibrary-like project

inserir a descrição da imagem aqui

in an existing project, you can change the output type in the project property:

inserir a descrição da imagem aqui

and yes, when compiling, a dll will be generated

  • Ta, what about it? What do I do next? I already came compiling as dll by default?

  • updated, if the output type is class library, yes, it will be compiled as dll

Browser other questions tagged

You are not signed in. Login or sign up in order to post.