I have an application which was written years ago in VB.NET. Recently I migrated it to .NET framework 4.8. This change was smooth.

Now I am planning to migrate it to an ASP.NET Core 10 Web API using C#.

Instead of manually doing that I checked for built in solutions. Earlier there were Upgrade Assistant which I used in Visual Studio 2022. Now from official docs I can see that it's deprecated. https://learn.microsoft.com/en-us/dotnet/core/porting/upgrade-assistant-overview and the alternative is Github Copilot App Modernization Chat Agent.

I have some concerns in using the Github Copilot App Modernization Chat Agent.

  • If I use that and migrate my application, will my code get exposed in some way?
  • Also is that the right tool to use?
  • As per the documentation of Github Copilot App Modernization Chat Agent for an application to migrate, it should be written in C#. But mine is in VB.NET. Is that possible to migrate?

If anyone with experience with the Github Copilot App Modernization Chat Agent could suggest, it would be helpful.

4 Replies 4

You don't migrate from VB.NET to C#, you'll need to re-write the VB.NET parts with C#.
Migrating from .NET Framework 4.8 to .NET 10 can be done before or after you finished the re-write.

I'd recommend migrating to .NET 10, and then re-writing your VB.NET application to be C#.

Alternatively, due to C# and VB.NET being so interoperable, you could migrate to .NET 10, and after that is done start by writing new functionality in C# and start (piecewise) replacing old functionality with C#.

Upgrade assistant is for converting a project-file to SDK style-format, and adjust things like framework and dependencies. And for this it still work perfectly fine, but it will not convert your code from VB to C#.

If that is the goal you are probably better of starting from a new project and just rewrite the code using modern tools and patterns, with a the old project more as a guide for what functionality should exist.

Using an LLM to convert code from VB to C# might be feasible. Translation is something an LLM should be fairly good at. But if you just try to convert everything you will likely not understand how the result works, and that will make it very difficult for you to fix any errors or bugs. So if you want o use an LLM I would recommend using it more like a teacher than a worker.

Using a LLM almost inevitably requires uploading your code. Any reputable LLM provider should tell you how that code can be used by them. But you cannot audit them for compliance, so some amount of trust is needed.

As above - this isn't a migration, it's a full ground-up re-write. And given the differences between the frameworks and the languages, that's a good thing.

You could simplify the process by keeping VB.NET as the language, which might mean that some of your existing code is re-usable, or at least can be adapted more easily.

I should point out, that not only vb.net matters here, but ALSO what type of project you are ugrading from!

So, as you noted, upgrading from say .net 3.4, or 4.0 to 4.8? Very easy - usually just changing the project build, and you are fine.

And to be fair, code from .net Framework, and .net core? Again VERY few changes.

However, where the big WHOPPER issue comes in?

If you had a .net Framework MVC web project? Then converting to a .net core project?

The wizard and migration tools -- even those depreciated ones? Really, VERY few changes are required.

However, two huge considerings?

Even if this was a asp.net WebForms to a MVC? Even if this was written in c#?

Your talking about a 100% whole re-write. Even the migration tools did not fix, nor upgrade such older webform sites. What the migration tools did is setup a front end "proxey" and continued to run the older site under webforms, and then over time, as you re-write the applcation into MVC, then you could host both older and newer pages.

So, migration from .net framework to .core and a MVC project? And c#?

Very easy - not much of any change.

however, the issue and probelm is not even vb.net, or even c#.

It is that a webforms project works VAST different then a MVC project, and no automated tools EVER existed and no such automatic conversion existed. In this case, it not the programming lanauge, and it not even .net core.

The problem is .net core does not have a webforms choice and a project.

So, even going from vb.net and asp.net (webforms), to vb.net and asp.net (MVC)? That is a 100% total re-write - it's a different approach and different design for building web applications - they are not compatible. So, migration tools never did help, nor would did they (or could they) address this challenge.

So, you don't mention what kind of project you have now. But, you have to both re-code from vb.net to c#, and the other hard part is re-writing and re-building the web site from WebForms to MVC -- or maybe even bazor or whatever. Regardless, even if the site was c#, you still taking about a 100% re-write of the web site.....

So, even a vb.net asp.net WebForms to a asp.net MVC site, and still in vb.net? It still was a 100% re-write......

if the vb.net site is MVC? Then you can well savlage the markup and site, and only the code need be written (for the most part). However, as I stated, vb.net, or c# don't matter if this is a WebForms project - that's a 100% re-write of the site, regardless of the language that was used....

There is no .net Core choice for WebForms - not allowed, does not work.

So, the site has to be re-designed as MVC first if it not already.....

Your Reply

By clicking “Post Your Reply”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.