Visual Basic is Losing Its Runtime Library
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.
Did you say "Visual Basic" ?
Re: Did you say "Visual Basic" ?
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#....
Juergen Hoeller,Stéphane Nicoll Dec 18, 2014
Helen Walton Dec 17, 2014