how can i migrate visual basic 6 code to vb.net code. I have complete projects in VB6. Please guide me.
Thanks
Printable View
how can i migrate visual basic 6 code to vb.net code. I have complete projects in VB6. Please guide me.
Thanks
Moved To General Developer
You don't migrate...you rewrite.
There are tools out there to assist in the conversation, but I've never met one that did it 100%. You will wind up with errors in the coverted project that you will have to run down and rewrite, so, given that, I always recommend just skipping the middle man altogether and just rewrite the project to begin with.
The book linked to here may be of help.
The trouble with a "conversion" is that even if you can convert the "code" you aren't actually converting the application. In other words - a VB6 codebase "converted" to .Net is just a VB6 code base IN .Net. None of the new coding techniques gets used by code that is so converted.
Back about 5 years ago I had to "convert" our Rules Engine (which was in VB6) into VB.Net. The conversion went OK - since it's mostly internal logic and doesn't depend on database access, etc. the resulting code worked OK after some cleanup work. However - what I'd really like to have done (had I had the time then) would have been to just rewrite the code altogether. What I'm maintaining now is a huge VB6 component that just happens to be in .Net. Since that conversion I've assimilated a lot of OO techniques that I didn't have back then. I have since written another rules engine (which I'll use in a product I'm developing). The interesting thing is that by using the new techniques I was able to reproduce approximately half of the functionality of the old component in a matter of months - one that has the functionality but none of the legacy limitations.
Even now, when I make changes to the big component owned by the company I find myself rewriting sections using the new techniques and can pull off things much more easily than I ever could have using the legacy architecture in the code. (This code originally dates back into the early '90's but is so deeply ingrained in our product that just rewriting it would be a monumental task). Having said that, though, I still think taking a year and rewriting the component would have yielded better, more maintainable results.
Rewrite your code from "scratch" if you possibly can. A "conversion" is a maintenance headache.
FWIW,
-Max :D