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?
Make sure you are clicking on the project file itself... Right click on the file and select "Open With" and select your visual studio program. It may need to be converted and if so, it will prompt you to convert the project.
The latest version of Visual Basic is Visual Basic 15. Visual Basic 6.0 is not supported in Visual Studio: Visual Studio 2010 does not provide tools for upgrading applications and projects from Visual Basic 6.0.
Visual Basic.NET can be installed on a computer that has Visual Basic 6 installed, and both can run at the same time. Applications written in both VB6 and VB.NET can also be installed and executed on the same computer. Furthermore, components written in VB6 can be used in VB.NET projects.
The VB to C# code converter from the SharpDevelop team is now a standalone extension to Visual Studio. Once installed, you can convert an entire VB.NET project to C# by opening the solution, right clicking the solution node in the Solution Explorer and selecting Convert to C#.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With