Daniel
Daniel

Reputation: 81

Making a DLL from a C# project?

Is it possible making a DLL file from an existing project in visual studio C# ? instead of giving an exe , i want to supply a DLL file for another person to use my methods in his code. i want to take the project as a whole and supply a DLL. It is already a big project with many components , but its built not right and it will take a whole lot of time to make this code into modules, so i rather give the whole project as a dll.

thanks for any help.

Upvotes: 8

Views: 15083

Answers (2)

sgtz
sgtz

Reputation: 9009

Do you want to keep the EXE version of the project as well?

If so, create a new project that has a target of assembly in the same solution, then link in the existing .cs / .vb files.

To link:

  • right-click on the project
  • add existing
  • select .cs file
  • click "Add" dropdown arrow
  • select link
  • hit "Add Link" button.

Upvotes: 1

Ivan Danilov
Ivan Danilov

Reputation: 14777

Project properties -> Application tab -> Output type -> Select 'Class library' there.

Upvotes: 18

Related Questions