How to create a dll file in Visual Studio C # 2010 Expres edition?

I already ran into the question of stack overflow. Is there a way to generate a DLL file from Visual Studio Express without explicitly creating a DLL project? "but it doesn’t directly respond to my request, so I bring it up here.

The problem that I encounter when trying to make a DLL is that I cannot find any option in the Build named build class class file. I changed the project property to a class file (shown below)

Here's what it looks like:

And this is how my build option is displayed:

Also, when I use the command line parameter, a dll file is generated, but it does not receive the properties that I set in the application.

I am new to Visual Studio, so I mixed up this part a bit.

+4
source share
4 answers

The Build Solution option in the second screenshot is what you need to click to create your DLL, or you can right-click on the project in the solution explorer and click Build:

Screenshot of the context menu in the Solution Explorer

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

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

The reason you don’t see the “Build class file” parameter is because this is what the “Build project” menu item does - it will create a class library if the project output type is “Class library”, windows executable, if the output type of the project is “Windows Application”, etc.

+10
source

You are not trying to create a class file - you are trying to create a class library.

And you just create a solution that will build each of the projects in your solution, including your LicenseCheckLibrary project - it's just a class library project.

It looks like you're mostly there - look in the bin\Debug or bin\Release folders in LicenseCheckLibrary and you will find the DLL.

+2
source

Why do you want to avoid creating a dll file in the first place? Do you develop an exe file for checking logic and then convert it to dll when it works fine? If so, why not create two projects: Windows Console and Class Library. The inner class library implements the licensing logic and uses Windows COnsole to validate the logic. When you say that you are new to Visual Studio, what exactly do you mean? Have you ever used it before or are you new to programming the .NET Framework? The .NET Framework has specific classes for developing licenses. In addition, there were proposals for stackoverflow overflow regarding licensing. Find some of them instead of reinventing the wheel.

Take a look at this article http://www.developer.com/net/net/article.php/3074001

0
source

enter image description here

  • Create a new class library project
  • Creating classes and code
  • compile the project
  • Created by Dll
  • Create a new project
  • Click the Add Link link
  • Go to the class library folder
  • Go to debug folder or whatever and enable

Remember that you will need to include a namespace. in a new project.

0
source

Source: https://habr.com/ru/post/1396788/


All Articles