Referencing VB 2005 dll in VB 2003


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 6 of 6

Thread: Referencing VB 2005 dll in VB 2003

  1. #1
    Join Date
    Feb 2005
    Posts
    46

    Referencing VB 2005 dll in VB 2003

    Hi everyone,

    is there any way I can reference a dll made with VB 2005 in a VB 2003 project? Everytime I try I get the error that it is not a valid assembly or COM component. I always figured that as long as the proper versions of the framework was installed, a dll was a dll. It seems I'm wrong.

    Anyway, does anyone know of a way I could get around this?

    Thanks,

    Luc

  2. #2
    Join Date
    Dec 2003
    Posts
    2,750
    This shouldn't be an issue. How are you adding the assembly to your project?
    Paul
    ~~~~
    Microsoft MVP (Visual Basic)

  3. #3
    Join Date
    Feb 2005
    Posts
    46
    I'm just adding a reference.

    Anyway I found this: http://forums.microsoft.com/MSDN/Sho...28853&SiteID=1

    it seems there's not much that can be done. Please let me know if you know of a way around this.

  4. #4
    Join Date
    Dec 2003
    Posts
    2,750
    Well I was thinking you could use the component from your app but I forgot that the development environment is hard-wired to a specific framework version, and of course you can't run a 2.0 assembly under a prior version of the framework.

    I haven't tried it but I'm speculating that this would work if you ran your app under version 2.0 of the .NET Framework.
    Paul
    ~~~~
    Microsoft MVP (Visual Basic)

  5. #5
    Join Date
    Feb 2005
    Posts
    46
    Do you mean migrate the code to VB 2005? Or is there a way I can force the app to run with the 2.0 version of the framework?

  6. #6
    Join Date
    Dec 2003
    Posts
    2,750
    You can force the app to load and run under the 2.0 framework.

    Side-by-Side Execution of the .NET Framework

    How to: Use an Application Configuration File to Target a .NET Framework Version

    Of course you would want to make certain that your app doesn't encounter any of the breaking changes that occured between versions of the framework.
    Paul
    ~~~~
    Microsoft MVP (Visual Basic)

Similar Threads

  1. How create dll file with vb
    By Ken in forum VB Classic
    Replies: 4
    Last Post: 12-14-2001, 04:11 PM
  2. Replies: 5
    Last Post: 07-20-2001, 02:25 PM
  3. vb dll iterfering with access functions
    By shachar in forum VB Classic
    Replies: 0
    Last Post: 03-23-2001, 02:41 AM
  4. Replies: 84
    Last Post: 01-29-2001, 01:12 PM
  5. How to print image using VB COM DLL and ASP?
    By Tarmo Ausing in forum ASP.NET
    Replies: 0
    Last Post: 01-24-2001, 07:25 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center