Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. C# Functionality(DLL) to VB.NET

C# Functionality(DLL) to VB.NET

Scheduled Pinned Locked Moved C#
csharpcomhelpannouncement
6 Posts 3 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    Vimalsoft Pty Ltd
    wrote on last edited by
    #1

    Good Morning Everyone i have an application in VB.net and a Functionality(dll) written in C#.i have a DLL in C# Project and i have compiled my project with release and Fetch the DLL in the release folder and paste it in the VBProject. now i want to use that C# Functionality in vb project, i went to References and i tried to Add it as .NET reference and i got the following Error.

    A Reference to Motherboard.dll could not be added.This is not a valid assembly or Com Component.Only Assemblies with extension 'dll' and Com components can be referenced.

    Thanks

    Vuyiswa Maseko, Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding VB.NET/SQL7/2000/2005 http://vuyiswamb.007ihost.com http://Ecadre.007ihost.com vuyiswam@tshwane.gov.za

    R V 2 Replies Last reply
    0
    • V Vimalsoft Pty Ltd

      Good Morning Everyone i have an application in VB.net and a Functionality(dll) written in C#.i have a DLL in C# Project and i have compiled my project with release and Fetch the DLL in the release folder and paste it in the VBProject. now i want to use that C# Functionality in vb project, i went to References and i tried to Add it as .NET reference and i got the following Error.

      A Reference to Motherboard.dll could not be added.This is not a valid assembly or Com Component.Only Assemblies with extension 'dll' and Com components can be referenced.

      Thanks

      Vuyiswa Maseko, Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding VB.NET/SQL7/2000/2005 http://vuyiswamb.007ihost.com http://Ecadre.007ihost.com vuyiswam@tshwane.gov.za

      R Offline
      R Offline
      Razvan Dimescu
      wrote on last edited by
      #2

      you c# assembly is probably not CLS compliant

      blog

      V 1 Reply Last reply
      0
      • V Vimalsoft Pty Ltd

        Good Morning Everyone i have an application in VB.net and a Functionality(dll) written in C#.i have a DLL in C# Project and i have compiled my project with release and Fetch the DLL in the release folder and paste it in the VBProject. now i want to use that C# Functionality in vb project, i went to References and i tried to Add it as .NET reference and i got the following Error.

        A Reference to Motherboard.dll could not be added.This is not a valid assembly or Com Component.Only Assemblies with extension 'dll' and Com components can be referenced.

        Thanks

        Vuyiswa Maseko, Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding VB.NET/SQL7/2000/2005 http://vuyiswamb.007ihost.com http://Ecadre.007ihost.com vuyiswam@tshwane.gov.za

        V Offline
        V Offline
        Vikram A Punathambekar
        wrote on last edited by
        #3

        The DLL is corrupt, apparently. What happens when you try opening it with ILDASM?

        Cheers, Vikram.


        The hands that help are holier than the lips that pray.

        V 1 Reply Last reply
        0
        • R Razvan Dimescu

          you c# assembly is probably not CLS compliant

          blog

          V Offline
          V Offline
          Vimalsoft Pty Ltd
          wrote on last edited by
          #4

          Hi thanks for the Reply i have created this DLL in C#.NET, and copied it to the other's application folder and tried to referenced it. doesn't Visual Studio automatically make it CLS Compliant?, because the DLL was created in VS2005 and am taking it to a Project in VS2003. is there a Problem there ? Thanks

          Vuyiswa Maseko, Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding VB.NET/SQL7/2000/2005 http://vuyiswamb.007ihost.com http://Ecadre.007ihost.com vuyiswam@tshwane.gov.za

          R 1 Reply Last reply
          0
          • V Vikram A Punathambekar

            The DLL is corrupt, apparently. What happens when you try opening it with ILDASM?

            Cheers, Vikram.


            The hands that help are holier than the lips that pray.

            V Offline
            V Offline
            Vimalsoft Pty Ltd
            wrote on last edited by
            #5

            If the DLL is Corrupt, the i can delete it from the Release Folder and Compile the Problem to give me an output of a fresh DLL, then after that i do the Same thing by Copying the DLL to the VB Folder Project and go to VS and reference the DLL under .NET, still gives an Error, and do it under Com still Gives me an Error. what wrong

            Vuyiswa Maseko, Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding VB.NET/SQL7/2000/2005 http://vuyiswamb.007ihost.com http://Ecadre.007ihost.com vuyiswam@tshwane.gov.za

            1 Reply Last reply
            0
            • V Vimalsoft Pty Ltd

              Hi thanks for the Reply i have created this DLL in C#.NET, and copied it to the other's application folder and tried to referenced it. doesn't Visual Studio automatically make it CLS Compliant?, because the DLL was created in VS2005 and am taking it to a Project in VS2003. is there a Problem there ? Thanks

              Vuyiswa Maseko, Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding VB.NET/SQL7/2000/2005 http://vuyiswamb.007ihost.com http://Ecadre.007ihost.com vuyiswam@tshwane.gov.za

              R Offline
              R Offline
              Razvan Dimescu
              wrote on last edited by
              #6

              you have to add manually this [assembly: System.CLSCompliant(true)] in the AssemblyInfo.cs of your class library, visual studio is not doing it automatically

              blog

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups