Visual Basic in .NET Core 3.0

Avatar

Kathleen

Visual Basic in .NET Core 3

 

Update: March 12, 2020

This strategy described in this 2018 post has been replaced with the one in this post.

Update: Oct 8, 2019

.NET Core 3.0 contains portions of the Visual Basic.NET Runtime (microsoft.visualbasic.dll) that do not depend on WinForms.

Visual Basic.NET support for WinForms, WPF, and other application types in .NET Core 3.0 is similar to C#. Special features of the Visual Basic.NET Runtime (microsoft.visualbasic.dll) are not in .NET Core 3.0. As an example, application startup using application models are not supported. Visual Basic.NET desktop templates are not in .NET Core 3.0 because the Visual Basic.NET experience is lacking these features.

Due to the embedded nature of WinForms in Visual Basic.NET parts of the My subsystem and application models that are not WinForms specific are also not in .NET Core 3.0.

Original Post from Nov 12, 2018

I’m excited about our plans for how Visual Basic.NET will be supported in .NET Core 3.0!

Like other .NET languages, Visual Basic will continue to be supported on .NET Framework, and you do not need to make any changes to your application.

You can read how .NET Core 3.0 affects C#, ASP.NET, and the .NET Framework.

This post covers what these changes mean to Visual Basic.NET for users interested in .NET Core. The short version is:

  • Visual Basic.NET compiles and runs on .NET Core today and this will continue
  • The familiar Visual Basic Runtime is not yet part of .NET Core, but will be included in .NET Core 3.0
  • Visual Basic 16.0 will ship at the same time C# 8.0 ships
  • Visual Basic 16.1 and 16.2 will improve C# interop and add new features

Visual Basic Scenarios

“We will focus innovation on the core scenarios and domains where VB is popular.” – From the .NET Languages Strategy

When we look at where Visual Basic development is happening, the majority of VB applications are Windows desktop applications – Windows Forms (WinForms) and WPF. This means our focus for Visual Basic in .NET Core 3 is desktop development.

The scenarios for Visual Basic in .NET Core 3.0 are:

ScenarioSupported VB in .NET Core 3
WinFormsYes
WPFYes
Console applicationsYes
Windows servicesYes
UAPYes
Test projectsYes

Visual Basic.NET Runtime on .NET Core

“We will do everything necessary to keep it a first class citizen of the .NET ecosystem.” – From the .NET Languages Strategy

Future innovation in .NET will occur on .NET Core 3.0. We are committed to making Visual Basic work well on this platform.

A large part of what makes Visual Basic special is the Visual Basic Runtime. .NET Core 2 contains only the small part of Visual Basic Runtime that is defined in the Visual Basic Language Specification which was initially designed for interop with phones.

The major effort for Visual Basic 16.0 will be moving the Visual Basic Runtime to .NET Core 3.0 to provide expected features like Mid or the My namespace. This work will probably not be ready for the first preview of .NET Core 3.0 but will appear in a later preview.

Cross-Language between Visual Basic and C#

“We will keep a focus on the cross-language tooling experience, recognizing that many VB developers also use C#.” – From the .NET Languages Strategy

Many Visual Basic developers also work in C# or work in shops with a combination of Visual Basic and C# code.

Visual Basic.NET on .NET Core will interop with existing C# code in the same great way it does today. Visual Basic 16.1 will include features that improve interop with C# 8.0. As an example, if C# 8.0 supports default interface implementations, we’d plan to add them to Visual Basic.

Features and Futures for Visual Basic.NET

“When API shapes evolve as a result of new C# features, for instance, consuming those APIs should feel natural in VB.” – From the .NET Languages Strategy

Over the last few years, Microsoft has added features to C# and .NET to create better infrastructure and make the tools you use and the applications you write faster. This benefits Visual Basic programmers.

Some of the API changes that support these infrastructure improvements involve things like pointer access to memory or demand significant code changes that aren’t consistent with Visual Basic’s goals of safety and ease of use. Not all APIs in .NET Core will be consumable from Visual Basic.

With exceptions like these, most evolving APIs will be available for Visual Basic and there are several interesting features we will consider for Visual Basic 16.2, including pattern matching.

Summary

“We will keep Visual Basic straightforward and approachable.” – From the .NET Languages Strategy

Visual Basic.NET has a dedicated programmer base that includes hundreds of thousands of developers. Microsoft will continue to work on the right balance of stability and innovation for Visual Basic.NET.

As we build out Visual Basic 16.0, I will post more details on this blog. You can watch or participate in Visual Basic Language design on GitHub.

Kathleen Dollard
Visual Basic PM

70 comments

Leave a comment

  • Avatar
    Richard Barnes

    From what I am reading it does not look like asp.net core 3 supports Visual Basic. I understand you want to put a stake in web forms, and I have no issues with that but no web developement in VB at all? Screw this I moving over to Python as my primary web language. WTG Microsoft, VB developer since VB2 who has stuck with you and you finaly broke my back. 

  • Avatar
    Harol Gomez

    I am very sorry to see how the VB.NET language and the programmers that use it are downplayed. Obviously, Vb.Net programmers have had to learn C #, F # and any other language because MS does not deliver timely documentation and examples in VB.NET. Even I wonder “Who will program only WinForms in these times?”, “Why not enable at least WEB API for Vb.Net Core ?, is so difficult?”. Somebody will program some new system knowing that another language of the same manufacturer will be very advanced in comparison. I think it’s a demotivation tactic, so that due to tiredness it simply stops being used without noise and for the joy of someone who surely is not in MS since its inception.

    • Avatar
      Gerard Jaryczewski

      Thank you, Harol, for your voice – I totally agree with every sentence. I feel demotivated by MS. It is really, deeply annoying, when documentation is truncated and hidden, when links of articles about VB are forwarded to another articles about C#.

      I even understand business reasons of Microsoft, but Microsoft doesn’t understand my business. I like .NET Core. I love Docs. But I need to work with VB. And I need its documentation.

      If Microsoft says, “Oh, come on! Is it so simple to move from VB to C#, under cover it is the same framework, and there are some converters!”, then I say: “‘Exactly, Microsoft. So maybe you simply convert your C# templates to VB?”. Really, deeply annoying.

  • Avatar
    Tim Hall

    Having just got a request to port something of mine from .FX to .Core for a (potential) new customer, having read this and run the portability analyser i thought great shoudlnt be tooo hard, but it seems that winforms still isnt supported by VB (cant create a winforms.core project in vs2019 or via dotnet new )
    I really hope that it arrives soon.
    I find it interesting that you say “A large part of what makes Visual Basic special is the Visual Basic Runtime. ” is that backed up by much evidence ? Sure i used Mid, LCase, Ubound, Trim in the early days and if need be one could easilly write ones own implementation of those, even better would be a roslyn based refactoring support to convert the old way into the new way. In 15 years the only olds school VB methods/keywords i used on purpose because it was easier (even though i knew how to do it the other way)  was Cstr/Cint/Cdec (i still use them in new code though), CallByName and ReDim anything else was pure not knowing any better. I use My, mainly My.Resources as its so much easier, but things like My.Computer.FileSystem. stuff is largely supperflous  as IO.File and IO.Directory cover most of it (one diff being VBs copy directory is vastly superior to inbuilt methods)
    The reason i prefer VB is  i hate case sensitivity, i prefer if end if to if (x) { }  (when deep nesting at least) and i hate ending lines in ; and generally the c# syntax irks me, but it really feels like VB is being killed by attrition/death by 1000 cuts.

  • Avatar
    James Perkins

    I have been a VB programmer for a long time.  I am a EE and I work with many applications and software packages that use VBA or VB like syntax for added functionality.  Very little C# or large C type language syntax other than maybe a semicolon at the end of every line.  I personally hate the C type languages as it is so cryptic with the {}; and Yoda type name declaration “A string I will call you StringTag” instead of Dim StringTag as String.  I program a lot of web form pages be it Window Desktop applications to Web form websites using VB.NET, CSS, and HTML with jquery because I don’t want to program javascript if I don’t have to. The MVC is a complex architecture that is in many ways overkill for a website or web application.  Entity Framework is not the best solution, I prefer to design the database then write my own stored procedures; I kind of think EF is for lazy programmers.  I like ASP.net with code behind, and Master Pages, and all of the toolbox items, to include Ajax tools.  To force everyone to MVC I think will start to kill Visual Studio and programming.  I have seen Python and Jython coding which is lacking compared to VB; they cannot do a Select Case from what I see and one if forced to indent for multiple If statements; which to me seems rather kludgy.  If I were to write a driver I think I would pick C or C++.  If I were to build a website or desktop application I would pick VB.  I am constantly using VBA to build Excel tools and VBA is built in a lot of applications.  I have built an interface to AutoCAD to dynamically generate drawing using VB as VBA is built in AutoCAD for automation use along with its other hard to understand artificial intelligence language that I can’t think of its name. So all of those Office VBA skills and other applications in my industry is why VB is ranking high on the user list.  VB needs to stay as C type language isn’t that user-friendly in my opinion.  I don’t think I will be moving to VSCore anytime soon.  I still have a ASP.NET 1.0 website that is still working today.  Web development alone should be simple instead of forcing Razor or MVC down our throat.  I bet many will move to basic HTML5 with some javascript and CSS for web development and abandon VS all together.

  • Avatar
    Sylvester Alelele

    While it is exciting that Ms is
    doing something to move VB forward, it is not nice to feel that thousands of lines of existing code will no longer work because VB will not support internet development.  It is also not pleasant to think that one will be forced to learn another programming language simply because VB will not permit you to build certain types of applications.

    Kindly ensure that VB developers do not end up with the short end of the stick here!

  • Avatar
    David

    I don’t think Microsoft is forgetting, or downgrading vb.net; less focus? of course. All the focus is on getting the new standards in place, .net core, winUI, Xaml standard, etc. We know vb.net will work in .net core for wpf, winforms, and uwp, and I think once the standards are completed, vb.net will become available for Xamarin.forms, and web development. It’s all priorities.
    Personally, I just want to develop a single app that runs on Windows and MacOS using vb.net and xaml.
    So, here’s something a little more controversial. C# gets all the new features because it needs it. Compare it to Swift and C# is looking old, it still requires a semi-colon ‘;’ at the end of every line, seriously?  I actually think vb.net is ahead of C#, some will argue it’s more verbose, but that’s a personal preference, I love the verbose nature, I hate looking at a ‘}’ and thinking, I wonder what the heck does!, as opposed to ‘end for’ – bliss.
    The vb.net language itself isn’t lacking, it’s almost perfect. New features need to be in the frameworks and compiler; and they’re coming, which means vb.net can use them just as C# and F#. The only thing missing is the use of vb.net in other areas such as web and cross platform, but I think that will come, in time.

  • Avatar
    Martin Soles

    So, it’s been 9 months since we heard anything here. Yes, I am trying to read up on things over on GitHub. There have been no public meeting notes since last year. The other discussions over there seem to be stagnant (last message was on June 30th), as well. How are things progressing? It would be nice to to have some kind of summary.

  • Avatar
    Jaco le Grange

    It is not because most development in VB.net is winforms. It is because Microsoft makes this assumption and only make the most necessary development tools available for VB.net focusing on winforms.Personally I would have done all my web development and mobile development in VB.net if I was able to.So now I reluctantly add to the flawed usage statistics regarding this… 

  • Avatar
    David

    A quick check on the Blog Posters for VB.net and it appears most of them no longer work for Microsoft, inlcuding Kathleen. 
    Microsoft – You have a great community of VB.net lovers, ask us to blog for you, bring us into the virtual-team at Microsoft and we’ll create some great content for you and respond to the comments. Open-source the blog 🙂

  • Avatar
    Hitesh Davey

    Hello MS VS & DOTNET TEAM! Is there anything really happing in VB.NET world? It has been almost a year now and we don’t see any update or blog post on this all-time favorite & beautiful computer programming language or we are beating a dead horse? It is also OK if you cannot add new language features in VB.NET like C# but just enable it to run everywhere where dotnet core is capable to run. We can do wonders if that option is done. 

  • Avatar
    David

    Thank you for the update, but while it contains the reasons why, it doesn’t provide the resolutions. For example, my immediate questions were…

    * When will the missing parts be implemented into .net core? I’ve heard in .net core 3.1, but not officially anywhere.
    * Does that mean future vb.net updates, specifically the my namespace will be tied to winforms code in .net core 3.x?
    * If so, vb.net is being restricted, can’t we have the option of vb.net without the my namespace (never used it myself)

    I think the frustration people have is the lack of committed statements. I’d love to see anything like these…
    * vb.net will be release with .net core 3.1
    * vb.net Is not being dropped and here’s the future roadmap in comparison to C#
    * vb.net will be available in .net core 5.x for mono

    Or even the opposite if it’s not true, tell us and we’ll have a path to follow, don’t tell us and people speculate, start rumours, and Microsoft gets a bad press. If Microsoft don’t know, tell us that as well, we’re all adults here and take the news :).

  • Avatar
    John Botha

    In this day and age with all the technology around us, allowing us to do things faster and better than before, VB.Net could be positioned to be the best of all languages to do things faster. It’s readability as programming language is the best – not cryptic stuff like { } ;. You can learn this language much faster than these other cryptic languages. With more and more younger people getting involved in computer programming since it is such an essential skill, which language is positioned the best to allow them to master the skill of programming ? A language like Visual Basic that uses letters, numbers, basic math symbols and well known words, or a C-language that needs the person to do decoding first before the meaning of the language becomes clearer, plus all it’s silly symbols to get a line of code authenticated so that the compiler will be happy with it. Nowadays, young people demand the easier ways of doing things – which technology is a key driver of enabling us this easier way of doing things – Visual Basic can flourish as the easier way of doing programming without compromising any standard. Why Microsoft is not positioning Visual Basic like this, not able to see it’s potential is a very, very disappointing!!!

  • Avatar
    The Bitland Prince

    I’m not using VB.NET at this time but I was interested in .NET Core support because, as others reported, it is a very handy language to use. I don’t want to criticize but guess what? I could have bet on the fact that VB.NET was not going to be part of .NET Core. Technological decision by Microsoft are nowhere to be trusted nowadays and announcements are worth nothing for the very simple fact that, as MS adopeted the opensource-esque way to develop by splitting teams, the left hand doesn’t know what the right hand is doing. Every announcement has a “best effort” label attached to it because of the lack of coordination among teams that is the result of the choice to save money and fire many devs.

    At the third major release of .NET Core there is no proper VB.NET support and all the chatting was just that: chatting. Even if Microsoft will be able to ship proper VB.NET support in (say) 3.1, what sane people would invest into a language that wasn’t supported in 3 major releases and thay you had to litelly beg to bring in ? And I’m sorry to write this one as VB.NET was my first choice as a language until a few years ago and whenever it was possible.

    Another “brave” choice by MS leadership. Oh, by the way, they accept pull requests… 😅😅

    • Avatar
      David

      I think it’s common knowledge now that Visual Basic.Net is included in .net core 3.0 (libraries only at this stage) and will be fully implemented and supported in .net core 3.1 – the reason for the delay was the unexpected work involved in bringing over the “my namespace” and “visual basic libraries” that make vb unique, mostly because they depend on the WinForms backend code, which is also delayed until .net core 3.1

      Because of this, the WPF/WinForms templates for new projects in Visual Studio were removed, again, to be re-introoduced when .net core 3.1 comes out.

      .net core 3.1 is due out in November 2019, along with Visula Basic 16, so not long now 🙂

  • Avatar
    Roshawn Dawson

    Disappointed that VB.NET cannot be used on .NET Core (any version) to develop web applications. And I was hoping to leverage the new Blazor framework for future development without being forced to learn another language. 🙁

  • Avatar
    John Botha

    New blog articles per language

    Any new articles for VB in 2019 ?

    Just another indication that Visual Basic is not a priority of Microsoft anymore.
    We haven’t seen any new article for 2019 for Visual Basic on the language blog.
    C# had at least 4 articles.
    Languages like Python, JavaScript and Typescript had many articles.
    Even a language like Visual F# had 1 dedicated article in 2019

    Let’s be real about this, MS aren’t really giving VB much time anymore!

    • Avatar
      David

      Have a look here as this gives a reasonable update as to the state of play.

      What I funny is that C# – the pride an joy, has only had 4 arcticles in 2019, given the release of C# 8 and .net Core, I think this shows that the blogs are the area where little time is being spent as opposed to the languages.

      We were going to switch to C# but got depressed coding it so we switched back to VB.net – I can explain if interested 🙂

  • Avatar
    Francisco Celedon

    When will be VB support for RAZOR?
    I see templates for C# and F# but none for VB!!
    We have near 80,000 lines of codes with more that 700 classes, structures, enums coming from years, when MS promised VB a long life support. Now, will be a very expensive migration project…

  • Avatar
    Hitesh Davey

    There are more VB.NET developers than F#. There are more real-time apps developed & running super using VB.NET than F#. So I wonder why VB.NET is not enabled for RAZOR & BLAZOR app development and F# is supported!!

    In one of the blogs talking about the roadmap to Dotnet Core, it is mentioned that the nearest WEB FOMRS alternative to Dotnet CORE is BLAZOR app than how we can migrate our VB.NET WEB FORMS apps to Blazor if not supported at all? This means we have to continue using the Dotnet framework forever.

  • Avatar
    John Botha

    So Python is to become the most popular programming language in the world, according to the TIOBE index, most likely in 2020.

    https://jaxenter.com/python-tiobe-dec-2019-165365.html

    Why? Well one of Python’s strongest trades are readability. That results into better productivity.
    VB.Net also scores high on readability. With Microsoft prefer to make C# the ultimate programming language with the hope to dethrone Java,
    MS should take note that it is most likely Python that is going to be there first.
    Is VB.Net the language that can compete against with Python due to plenty of similarities or C# ?

  • Johnnyxp64
    Johnnyxp64

    PLEASE rename vb.net to B# (pronounce should sound “be Sharp”). 😎

    dear Kathleen, B# seriously will get rid of the old “mind set” that many still have that is the old “VB 6”, will make it more “trendy” and in the same concept and family of the C#, F#, we would have and B#.

    because “be sharp” is always > “just See sharp”

    and remember millions of students use VB.net in the world to start learning programming and not freak out by the {} ; and reverse syntax that other c++ style languages have!

    Also that will boost it even more when added in .NET / CORE framework!so i hope you can convince the others and do the change… after all Microsoft had made a mess in the past with naming frameworks that was so damn confusing, and now whoever was responsible for the rebranding of all frameworks into .NET finally had some common sense! lets make B# happen (i have faith in you!)😁

    p.s Bill Gates created Microsoft thanks to Basic. lets not stop educating people. we need developers!😎😉

  • Avatar
    Jonas N

    So sad to see VB.NET fall behind C# in terms of in-house support. It was a surprisingly capable BASIC dialect and probably the best one in history. There have been few enhancements to its language design the past five years so I suppose it has already fallen into the shadow of C# like F#, where the users have to fight to even get feature parity to it. The lack of solid ASP .NET Core & Blazor support is probably the greatest sign of it having entered maintenance mode, given the enthusiasm over these technologies both at Microsoft and elsewhere. Maybe you should just confirm it to not sow false hopes?

  • Avatar
    Ismail Demir

    “We will do everything necessary to keep it a first class citizen of the .NET ecosystem.” – From the .NET Languages Strategy

    Nice strategy but knowing that there is NO ROADMAP since years i think you guys have no plan. You failed!

    Thats not the way a “first class citizen” deserve!

  • Avatar
    David

    So it looks like full vb.net support (vb.net language, visualbasic.dll, my namespace, and project templates) will be part of .net core 5.0, and that makes sense.

    First off, I’m not “in the know”, but reading all the responses from Microsoft (including the ones now deleted), bringing it all together and speculating based on events, and previous years announcements:-

    * Full vb.net will be supported in .net core 5.0
    * vb.net will get the new enhancements (span, etc) if they’re appropriate for the language
    * Expect announcements at build 2020 in May – maybe online only now because of Corvid-19 (coronovirus)
    * Expect beta in May with supported release in November 2020
    * Expect UWP vb.net to move to .net core 5 (and Xamarin)
    * UWP isn’t dead, it’s changing, but it’s the native way for future devices such as neo (and duo phone???)

    • Avatar
      Sérgio Terenas

      I’d recommend you guys follow Olia Gavrysh on Twitter. She communicates Winforms updates on .net core and replies to DMs. Rest assured Olia’s team is working hard on Winforms and bringing the designer/components back into core. I anxiously await for GA to be able to modernize our apps without the steep learning curve of C#.
      I’m on the same boat as you guys, need VB.NET, have VB.NET APPS running at several customers and am old enough to be forced to learn C#