BT
x Your opinion matters! Please fill in the InfoQ Survey about your reading habits!

Visual Basic is Losing Its Runtime Library

by Jonathan Allen on Jan 13, 2011 |

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.

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.

Tell us what you think

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

Email me replies to any of my messages in this thread

Did you say "Visual Basic" ? by Rusco Rayban

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

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

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

Email me replies to any of my messages in this thread

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

Email me replies to any of my messages in this thread

3 Discuss

Educational Content

General Feedback
Bugs
Advertising
Editorial
InfoQ.com and all content copyright © 2006-2014 C4Media Inc. InfoQ.com hosted at Contegix, the best ISP we've ever worked with.
Privacy policy
BT