2

Hi how to create my own dll for my c# application.

2
  • 2
    can you add more context about what you have at the moment? Any library project will build to a dll... Commented Sep 14, 2010 at 11:57
  • 1
    Way too vague to be given a meaningful answer Commented Sep 14, 2010 at 12:12

4 Answers 4

5

in Visual Studio:

  1. open Solution Explorer
  2. right mouse click on solution
  3. Add | New Project
  4. Pick Class Library

To use it in other projects you must add reference to it.

Sign up to request clarification or add additional context in comments.

Comments

3

Visual Studio -> New Project -> Class Library
And after compile you will have .dll in bin/debug directory

3 Comments

So a .dll is nothing but a pre compiled class?
@Gunner: It's a compiled assembly consisting of one or more classes.
Tu use it, you have to reference it in your application by clicking right mouse button on "References" and selecting your .dll, you can also set "copy to program directory", so you wont have to copy it manualy.
1

Create a New Project with the template > ClassLibrary, then add classes into it and build the project. Now your dll will be copied to the \bin\debug folder. Thats it.

Comments

1

When creating a new Project, select "Class Library", this will compile to a dll.

For an existing project, on the project properties, on the application tab, for "Output Type" select "Class Library".

If you have a Windows App, and you want to expose some of it's functionality as a DLL, then you need to factor out the functionality to a seperate class library project.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.