What is the process for upgrading my current VB-based, webforms projects to .NET 8?

Ravi Persaud 0 Reputation points
2023-04-12T21:51:17.07+00:00

I'm 60 years old and have used Visual Studio for many years. Currently, I develop apps that are deployed to Azure. As my needs do not require very complex platforms, I use Visual Basic in .NET 4.8. What is the process for upgrading my current VB-based, webforms projects to .NET 8? Is it possible? If so, what steps should be taken?

Developer technologies | ASP.NET | Other
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Albert Kallal 5,586 Reputation points
    2023-04-13T02:43:23.9+00:00

    Unfortunately, there is no real automated upgrade path here.

    In other words, "web forms" is quite much now legacy. To build web sites using .net core, you have to create what are called MVC sites. . They don't have a drag + drop designer, and you not using the "web forms" event model. Such applications can be written in VB.NET or c#. . However, if you wanting to use .net core? (which is .net 8?). Then you not only have to dump web forms (no drag + drop visual designer), but you also have to write in c#, since vb.net ONLY has support for web development up to .net framework 4.8.

    So, just keep in mind that: .net framework and .net core? .net core is simply a "newer" version of the .net runtime. Code written and for the most part you not see ANY difference in the code you write for .net framework vs code written for .net core. . What was done (changed) here is that for close to 20 years, while the .net runtimes were "mostly" and "sort of" platform neutral, they had over time adopted quite a few dependances on the windows platform. . The .net core is thus a "near the same" system (a .net runtime system), but one written with multiple platforms in mind. In other words, they cleaned up the whole new runtime system, and removed any hard coded windows platform dependences to that runtime. As a result, code written in .net core in theory can now run on just about any computer - including Linux computers.

    (so windows, Apple/Mac, or even android can run .net core code). However, in this process? They don't support vb.net for .net core.

    . So, to adopt .net core (.net 8), then 2 things would be required to migrate your web-forms application. . You would have to adopt, write and learn to use MVC web sites. While such web sites can be either vb.net, or c#? Only c# is supported beyond .net 4.8.

    Now, MVC been around as a "choice" for both c# and vb.net to build web sites. (about 2009, so we all had this choice for about 14 years - a long time in our industry). . So, moving a existing MVC site to .net core? it should be a very seamless process. There is not any automated upgrade path for a web-forms application written in c#, or vb.net.

    So, there not a automated upgrade path here. You have to adopt MVC for your web development approaches here. (and that means no drag + drop, no visual designers).

    And to adopt ANY version of .net core? Then you can't use vb.net for that choice.

    . So, .net core (2. 1, 2.2, 3.0, 5, 6, 7, 8) are simply newer versions of the .net framework, but of course limited to using c#, not vb.net for web sites. And of course, none of the .net core versions support web-forms, or that familiar drag + drop, and event modal that so many have come to love and know! . So, I hope the above helps with understanding what ".net core" is all about. The writing of code does not change from .net framework to .net core (assuming you writing in C#). And in fact for a MVC web site based on .net framework, you not find really much of any different when jumping from .net framework to .net core. The code is really much the same - very few changes if any). . However, there not support for vb.net in .net core, so us vb.net folks are quite much limited to .net 4.8, and that's it. To continue moving forward, one will have to both adopt c#, and also adopt MVC for web page development. . So, there not really any automated system here for such upgrades. The only real path forward is to adopt/lean how to build MVC sites, and then adopt c#. . Having stated the above? Microsoft's support for vb.net and webforms has been rather good, and one of the "best" new features for vs2022 is for webforms and so called "live" preview of web forms. So, webforms is not "dead" yet, but is certainly what I would call "legacy". . it is unfortunate, since when web forms is no longer a viable option, they are going to lose a BIG chunk of developers to other platforms - especially those that offer component based approaches and drag +drop for those components. With the rise of HTML5, and web assembly? Then developers will soon have some amazing choices. I predict that the return of visual designers for both components, and even css frameworks will EASY win the day. This WILL return and become the standard way of development again. The problem was the last 10 years been a ride of web technologies being created, and the web standards finally settling down to a dull roar. And now that's occurred, and new standards have risen up? . Then that great approach of the past of drag + drop and visual design of web pages? it will return with a vengeance, and EASY win the hearts and minds of developers - it just not going to be webforms. Huge boatloads of gold are to be had for the taking here. And whoever reaches that design paradigm? They will win the marketplace like the thunder that vb experienced in the early 90's with drag + drop development - and it set our industry on fire.

    . Unfortunately, that platform not going to be vb.net, or even .net core as the choice when someone gets the mix of web assembly, css pre-designed (like tailwind), and a great drag + drop tool box of components.
    Whoever crosses that bridge to such a design approach will light this industry on fire again, but it not going to be MVC - its just not.

    0 comments No comments

  2. Lan Huang-MSFT 30,191 Reputation points Microsoft External Staff
    2023-04-13T03:24:21.8333333+00:00

    Hi @Ravi Persaud,

    ASP.NET Web Forms isn't supported in ASP.NET Core (nor are ASP.NET Web Pages).Typically, the functionality of these pages must be rewritten when porting to ASP.NET Core.

    Migrating directly from ASP.NET Web Forms to ASP.NET Core isn't supported. However, there are strategies to make moving to ASP.NET Core easier. You can migrate your Web Forms functionality to ASP.NET Core successfully by:

    • Keeping non-web functionality out of your projects.
    • Using web APIs wherever possible.
    • Considering Blazor as an option for a more modern UI.

    Strategies for migrating ASP.NET Web Forms apps

    Upgrade an ASP.NET Framework Web Forms app to ASP.NET Core ASP.NET Core MVC

    Best regards,
    Lan Huang


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.