• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 482
  • Last Modified:

Create a dll from my project

Hi Experts,

I have written some functions in a C# project and wish to use them in a VB.Net project. To do this I need to create a dll file from my C# project and reference it in my VB.Net code. How do I create the dll file. I have read that you 'Build' the project and a dll is created but when I click Build from the Debug menu I do not seem to be creating the required dll.

How do I create this dll and where is it to be found?
0
DColin
Asked:
DColin
  • 3
  • 3
  • 2
  • +3
1 Solution
 
buraksaricaCommented:
Does the build process return errors? if not, Check your project's output folder, if it's correct, check the project type.
0
 
AndyAinscowCommented:
I assume you did do this as the very first step - see image.

If you didn't then do that and copy your existing files across to the new project
0010.jpg
0
 
JogaiCommented:
Go to your project in Visual Studio and choose for "Class Library" under "Output type:" on the application tab.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
JogaiCommented:
Go to your project properties in Visual Studio and choose for "Class Library" under "Output type:" on the application tab.
0
 
DColinAuthor Commented:
My C# project was created as a Win form. How do I turn it into a Class Library.
0
 
AndyAinscowCommented:
I'd suggest renaming, creating a new project with the name of the original one then copying the code and resource files across.

You could just try changing the output type BUT there may be other settings you will have to modify as well.

(At a minimum create a new dummy project and check EACH possible setting in your current app and set them to those of the 'class library' type of project)
0
 
pankajghargeCommented:
Change Output type as a class library in project properties
0
 
DColinAuthor Commented:
Once the dll is created and referenced do I have to add anything to my VB.Net code or can I use the dll's functions without any references in the code?
0
 
AndyAinscowCommented:
As long as the dll is referenced and available you should be able to use it (don't forget the namespace to identify which library the function is in - as you would in C# to qualify the name)
0
 
DColinAuthor Commented:
The name of the dll is Moserware.Skills.dll I have coppied it into the Debug folder of my VB.Net project. I add it as a reference via the Browse tab of the add reference dialogue box. But I am unable to use any of the functions in my code I am told the namespace is not declared. When I check the references tab of my VB.Net project's project page I see that Moserware.Skills is listed as a reference name but under path it says <The system cannot find the reference specified>
0
 
CodeCruiserCommented:
Reference it from the original location. You could have also added a class library project to your existing solution and then used project reference instead of browsing to DLL.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 3
  • 3
  • 2
  • +3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now