16

Has anyone migrated a VB6 project to .Net with Visual Studio 2010?

I have tested the migration in VS2005, but the resulting .Net code was so messed up, that we decided not to migrate to .Net. So has the VS2010 migration wizard been improved over the wizard in VS2005 or VS2008?

MarkJ
  • 30,070
  • 5
  • 68
  • 111
Allan Simonsen
  • 1,242
  • 4
  • 22
  • 37
  • 3
    I migrated a VB 6 project to a .NET 3.5 project. However the migration was a rewrite. Even if you could migrate the code directly, you would most likely want to use a completely different architecture that would warrant a clean slate. – RichardOD Jun 24 '09 at 14:07
  • No time right now to put in a full answer, but can I recommend browsing the top-voted questions tagged vb6-migration? For instance http://stackoverflow.com/questions/395/how-to-switch-a-large-app-from-vb6-to-vb-net – MarkJ Jun 24 '09 at 17:18

6 Answers6

11

It certainly hasn't in 2008 and I'd be very surprised if it's any different in 2010.

VB6 and VB.net are totally different languages, and MS has never officially endorsed an automatic migration route for anything beyond simple applications. The migration path is non-trivial. There are several companies around that offer migration services, I haven't tried them but my advice would be manage it yourself.

We currently have several apps that are written largely in VB6. Our position is that existing working code is not migrated to .net without a good reason, but all new code must be written in .net (We've actually chosen C#)

What this means is that if we want to add a new feature to an existing VB6 app the feature must be implemented in .net with some interop. Gradually over time are apps are becoming more and more .net and less and less VB. We have 1 app that just has a tiny VB6 component now and the rest is almost entirely in .net thanks to this gradual migration approach. It has worked very well for us. Once we reach a stage where the VB6 portion is minimal, we simply manually convert the remaining code without high cost because there is only a tiny bit left.

Simon P Stevens
  • 27,303
  • 5
  • 81
  • 107
  • There are some good third-party alternatives to the pathetic built-in migration wizard: Artinsoft's and VBMigration.com. Microsoft UK even recommend them. More discussion here. http://stackoverflow.com/questions/638152/best-development-tools-for-upgrading-from-vb6-0 – MarkJ Jun 25 '09 at 19:32
4

As many have pointed out, I very much doubt there will have been much more work done on the VB6 upgrade wizard. The VB6 upgrade wizard in Visual Studio is actually a cut down version of ArtinSoft's Visual Basic Upgrade Companion.

Upgrading a non-trivial VB6 application is a fairly time consuming task but there are a number of great articles such as this one that can help smooth out the road for you:

Refactor Your Way to Migration Success (VSM)

A combination of good methodology and professional tools such as those by ArtinSoft and Code Architects will hopefully make for a successful result.

Kev
  • 118,037
  • 53
  • 300
  • 385
  • +1. Can I also point to some good discussion elsewhere on StackOverflow, e.g. in this question http://stackoverflow.com/questions/638152/best-development-tools-for-upgrading-from-vb6-0 – MarkJ Jun 25 '09 at 19:31
4

Visual Studio 2010 no longer ships a Visual Basic 6 migration wizard tool as mentioned here in the top paragraph. This page links to a list of suggested 3rd party VB6 migration tools.

dsluis
  • 156
  • 1
  • 5
1

I would seriously doubt it, VB10 has not introduced any features from VB6 that were not present in VB7, 8 or 9, so there would be no new reasons for them to update their (arguably inadequate) upgrade wizard that did not exist in 2005.

Patrick McDonald
  • 64,141
  • 14
  • 108
  • 120
  • There are some good third-party alternatives to the pathetic built-in migration wizard: Artinsoft's and VBMigration.com. Microsoft UK recommend them. More discussion here with links http://stackoverflow.com/questions/395/how-to-switch-a-large-app-from-vb6-to-vb-net/82200#82200 – MarkJ Jun 25 '09 at 19:34
0

Since VS2010 is still in Beta, it's hard to say how the final product is going to perform. Right now, it looks like the Migration code is still a little rocky.

I'm going out on a limb and saying that VS2010 isn't going to be any better at importing something as old as a VB6 project than previous versions. Chances are, no matter what happens, you're going to have to re-write a significant portion of that application to get any benefit out of .NET anyway.

Justin Niessner
  • 242,243
  • 40
  • 408
  • 536
0

Visual Studio conversion of VB 6 is spotty at best, due to some of the fundamental language changes. You might find better success looking at a third party tool like VBMigration Partner

Rad
  • 8,336
  • 4
  • 46
  • 45
  • Quite true. Microsoft UK recommends two third party migration tools as better than the built-in VB.NET upgrade wizard - Artinsoft and CodeArchitects VBMigration Partner. Here's the link http://msdn.microsoft.com/en-gb/dd408373.aspx – MarkJ Jun 25 '09 at 19:37