BT

InfoQ Homepage News Visual Basic is Losing Its Runtime Library

Visual Basic is Losing Its Runtime Library

Bookmarks

Until recently Visual Basic required a separate runtime library that contained many of the operations that were not available in the core framework. In addition to legacy functions and some random, but useful, utility classes it has support for key features like VB’s late binding and conversion operators. (C# 4 also has a runtime library, also for late binding.) Unfortunately many platform designers including those for XBox 360/XNA decided not to include the fully implement the Common Language Runtime. This meant that certain op-codes needed by Visual Basic’s runtime library simply don’t exist on these platforms.

In 2008 the Visual Basic compiler gained the ability to use alternate runtime libraries. This was supposed to allow platform developers to ship their own version of the VB runtime without the bloat from optional and legacy features. Except for Windows Phone 7, it didn’t actually happen. The work involved in creating a custom implementation was just too great.

Starting with VB 10 SP 1, a new compiler option is being introduced to address these issues. Instead of building a custom runtime, parts of the existing runtime are embedded into the application. Only essential features such as conversions and VB-specific attributes are included. Features that didn’t make the cut include:

  • Legacy VB Functions – Such as Left, Mid.
  • Legacy Like operator
  • Old Style VB “On Error Goto Error” Handling
  • Late Binding
  • Much of the My Functionality

Those surprised by the lack of late binding support should note that C# will not have late binding either on platforms that need this compiler option. Essentially that means any platform that doesn’t include the Dynamic Language Runtime. This isn’t the first time VB lost its late binding capabilities; it is also unavailable off when compiling for the .NET Compact Framework.

Microsoft doesn’t expect normal developers to ever use this flag. Rather, it will automatically be set in the project template if the target platform doesn’t already include Microsoft.VisualBasic.dll.

Rate this Article

Adoption
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Community comments

  • Did you say "Visual Basic" ?

    by Rusco Rayban /

    Your message is awaiting moderation. Thank you for participating in the discussion.

    I didn't know this language is still in use ? As far as I know they broke compatibility after VB6 and everybody switched to C#....

  • Re: Did you say "Visual Basic" ?

    by Muthu Krishnan /

    Your message is awaiting moderation. Thank you for participating in the discussion.

    Think broad, there are more people out there other than you, who are still using VB.NET

    .

    I didn't know this language is still in use ? As far as I know they broke compatibility after VB6 and everybody switched to C#....

  • Re: Did you say

    by adelio stevanato /

    Your message is awaiting moderation. Thank you for participating in the discussion.

    You will find a great number of developers still using vb
    Not everyone wants to code I pseudo java
    Personally I hate its case sensitivity

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

BT

Is your profile up-to-date? Please take a moment to review and update.

Note: If updating/changing your email, a validation request will be sent

Company name:
Company role:
Company size:
Country/Zone:
State/Province/Region:
You will be sent an email to validate the new email address. This pop-up will close itself in a few moments.