locked
Using dll assemblies RRS feed

  • Question

  • Hi there,

    I have created a dll file from my own class using microsoft documentation. The class language is C#. I also have added reference to the dll file. My problem is when i want to use this class i get error in which class must be declared. It is worth to note that intellisence do not work for this dll class. Like that i did not declare any class.

    What do i must to do?


    Please excuse me for bad and poor English.

    Thursday, February 16, 2012 12:43 PM

Answers

  • Just create a class library project in Vs.Net and then add your class file to it. Now compile your project. In the other project just add the reference to this dll and you should be able to use the class.


    Rajesh S V

    • Marked as answer by Mousavi Friday, February 17, 2012 5:04 AM
    Thursday, February 16, 2012 4:09 PM

All replies

  • without any msg of error, or any better explanation, you dont have nothing to do. Maybe you should check your code again, or try to create dll again, following documentation as you say, but i think if it doesnt solve your problem, u have a big chance that error be a some line in code.

    Thursday, February 16, 2012 12:50 PM
  • Hi,

    maybe because you forget to add a reference to the assembly. otherwise you shouldn't import the name space. You can add a reference to the assembly by right click on your project-> add reference. then in your code file write using namespace; then intellisense would work.


    Bilhan silva

    • Proposed as answer by Norkk Thursday, February 16, 2012 12:58 PM
    Thursday, February 16, 2012 12:55 PM
  • Hi,

    maybe because you forget to add a reference to the assembly.


    Thank's for your replay, But i added reference to assembly file. But not works.

    Please excuse me for bad and poor English.

    Thursday, February 16, 2012 1:10 PM
  • Then make sure that you added a using statement to your assembly:

    using YourAssembly.YourNamespace;

    Best Regards. Please Mark Answered, If my solution solves your problem.

    Thursday, February 16, 2012 1:18 PM
  • Not works.

    Please excuse me for bad and poor English.

    Thursday, February 16, 2012 3:08 PM
  • Is there another way to create dll file? Maybe my problem is to creation of dll file.

    Thanks


    Please excuse me for bad and poor English.

    Thursday, February 16, 2012 3:12 PM
  • Just create a class library project in Vs.Net and then add your class file to it. Now compile your project. In the other project just add the reference to this dll and you should be able to use the class.


    Rajesh S V

    • Marked as answer by Mousavi Friday, February 17, 2012 5:04 AM
    Thursday, February 16, 2012 4:09 PM
  • Just create a class library project in Vs.Net and then add your class file to it. Now compile your project. In the other project just add the reference to this dll and you should be able to use the class.


    Rajesh S V

    Thanks Rajesh S V. I use your approach. Its works fine for me.


    Please excuse me for bad and poor English.

    Friday, February 17, 2012 5:04 AM