.NET 7 Here we come!
by John Browne, on Jan 10, 2023 5:00:00 AM
Today we're announcing general availability of Visual Basic Upgrade Companion version 9.5 with full .NET 7 support.
If you're a little confused still about all the .NET versions and names, here's a dramatically over-simplified way to think about it. ".NET" now means .NET Core, except we don't call it that anymore. And .NET Core (remember we just call it .NET now) replaces the .NET Framework (nee ".NET") and--unlike the predecessor--is both open source and cross-platform (as opposed to proprietary and Windows-only). Going forward (which is actually now), .NET gets all the love and the old Framework is legacy only; there are some things you still need the framework for in Windows development but .NET supports everything Microsoft finds interesting currently.
Oh, wait, there's more: versions. Every year (so far every November), Microsoft (who controls the code base) releases a major version of .NET. Every other year is a LTS or long-term support version and in between is a non-LTS (STS?) version. .NET 6 is the current LTS version and .NET 7 is just the intermezzo until .NET 8 which will also be LTS.
.NET is open source, so there is a lot of community support, but Microsoft also has a ton of developers helping build it out. So every release brings plenty of new goodies. And this .NET release brings improvements to performance, JSON serialization, generic math (in C# 11), and regex stuff. Plus MAUI, F# 7, and a new version of Visual Studio are along for the ride.
VBUC 9.5 with .NET 7 support
We want to stay current, so as of right now you can target either .NET 6 or .NET 7 using VBUC version 9.5 when you migrate VB6 to .NET (you can also target .NET Framework from 4.0 on. And more:
This way there's broad support for both existing legacy libraries as well as the most current ones.
Going to GoTo
The GoTo keyword in VB6 was a relic of the original BASIC programming language and, despite being largely reviled by every thinking member of the Non Spaghetti-Programming faction, it had a long and terrifying life. GoTo is a direct link to assembly language, where one jumps to different instructions based on the results of, say, a comparison between two values. Very Old Programming Languages celebrated this because they had little alternatives to direct the flow of a program. BASIC programmers from the 80s probably liked it because they had unhappy childhoods. When Microsoft created VB.NET (which in turn replaced classic Visual Basic), they added support for GoTo with some limitations. C#, being a resident of a better class of language neighborhood, looked down its nose at GoTo and refused to let it in the door.
Up to now, if you had On Error Goto or just GoTo in your VB6 code, the VBUC sort of threw up its hands when you migrated to C#. With 9.5 we have added support to both GoTo [line num/label] and On Error Goto:*
- GoTo statements are converted to local functions
- On Error Goto maps to a try/catch pattern to throw an exception.
You can read all about it here.
All in on ASP.NET Core
When we developed WebMAP with an eye to making Windows (and Java) desktop apps into native web apps (a non-trivial challenge), we opted to use ASP.NET as the back end server architecture. .NET 7 brings a new version of ASP.NET Core, which is what WebMAP currently targets when converting Winforms, Web Forms, or PowerBuilder to web native. This brings the option of running ASP.NET Core apps on Linux or MacOS servers--something our customers have told us they are pretty excited about. They are easy to build on containers then deploy seamlessly to production using container clusters for cost-effective elasticity to respond to user load. Run in your own datacenter or on Azure, AWS, or the public cloud of your choice.
We've recently signed some customer deals with workloads exceeding 2 million lines of code which I think is a real testament to the power of VBUC and WebMAP; these customers frankly had no realistic road forward that didn't include automated modernization tools like ours. If you haven't tried VBUC yet, I urge you to take a look.
*If you have production code using line numbers for control flow I don't think we can be friends anymore.