|
|
|
date: Wed, 20 Aug 2008 14:20:59 -0700 (PDT),
group: microsoft.public.dotnet.framework
back
Re: Converting VB6 to C#
Stephen wrote:
> I have a large VB6 code base that I need to convert to C#. I am
> assuming that the best approach would be to first convert it to VB.NET
> and get it into a compilable state, then to convert it to C# from
> VB.NET.
>
> Problem: I see a lot of converters out there that do a pretty good
> job of performing the conversion. But most of the ones I see do this
> on a file by file basis rather than a project by project basis.
>
> So: what's the best converter out there that will take a VB.NET
> project as input and produce a C# project with converted code as
> output?
I found this:
http://www.instantcsharp.com/Product_Details/Instant_CSharp.htm
but it translates VB.NET code into C#.
IMHO the right way is to do the VB6 -> C# translation by hand directly
without using external tools.
And yes, this will be _quite_ time-consuming.
But hey, just try to convert a VB6 class to VB.NET with the tool that
comes with Visual Studio, and you'll see that what you obtain is a
*large* amount of warnings and errors. In my opinion, it will take much
more time to resolve that warnings than converting the code by hand (and
I guess this will be particularly true if your VB6 code makes a lot of
calls to Windows APIs).
Also, I believe that converting VB6 to VB.NET only with an external tool
could produce some not-so-reliable results (maybe some subtle changes
here and there, that could introduce some very hard-to-find bugs).
Probably, converting VB.NET code you obtained in such a way to C# may
lead to even worse results.
Quite frankly, I think that reviewing the resultant code would be a big
loss of time.
Converting by hand also gives you the opportunity to refactor your code,
and to improve its architecture taking advantage of current
object-oriented best practices.
I guess it all probably boils down to a matter of personal taste: I
surely would prefer to spend some time to refactor my code to obtain
something that will last - I guess - for years instead of spending
endless hours fixing warnings and doing bug-hunting on something
produced by an automatic tool (which, in my opinion, will never be able
to substitute a developer).
Just my 2 cents.
--
S.
date: Thu, 21 Aug 2008 02:53:20 +0200
author: Stevie
Re: Converting VB6 to C#
Plus another option could be :
http://msdn.microsoft.com/en-us/vbrun/default.aspx (discuss VB6/VB2005
interop)
It targets VB6/ VB2005 but I don't see why most of this material wouldn't
apply to C# as well especially if the goal is to be able to add new features
using .NET in this existing code base...
--
Patrice
"Stevie" a écrit dans le message de groupe de
discussion : 703rk.21632$0N.20577@tornado.fastwebnet.it...
> Stephen wrote:
>
>> I have a large VB6 code base that I need to convert to C#. I am
>> assuming that the best approach would be to first convert it to VB.NET
>> and get it into a compilable state, then to convert it to C# from
>> VB.NET.
>>
>> Problem: I see a lot of converters out there that do a pretty good
>> job of performing the conversion. But most of the ones I see do this
>> on a file by file basis rather than a project by project basis.
>>
>> So: what's the best converter out there that will take a VB.NET
>> project as input and produce a C# project with converted code as
>> output?
>
>
> I found this:
>
> http://www.instantcsharp.com/Product_Details/Instant_CSharp.htm
>
> but it translates VB.NET code into C#.
>
> IMHO the right way is to do the VB6 -> C# translation by hand directly
> without using external tools.
>
> And yes, this will be _quite_ time-consuming.
>
> But hey, just try to convert a VB6 class to VB.NET with the tool that
> comes with Visual Studio, and you'll see that what you obtain is a *large*
> amount of warnings and errors. In my opinion, it will take much more time
> to resolve that warnings than converting the code by hand (and I guess
> this will be particularly true if your VB6 code makes a lot of calls to
> Windows APIs).
>
> Also, I believe that converting VB6 to VB.NET only with an external tool
> could produce some not-so-reliable results (maybe some subtle changes here
> and there, that could introduce some very hard-to-find bugs). Probably,
> converting VB.NET code you obtained in such a way to C# may lead to even
> worse results.
>
> Quite frankly, I think that reviewing the resultant code would be a big
> loss of time.
>
> Converting by hand also gives you the opportunity to refactor your code,
> and to improve its architecture taking advantage of current
> object-oriented best practices.
>
> I guess it all probably boils down to a matter of personal taste: I surely
> would prefer to spend some time to refactor my code to obtain something
> that will last - I guess - for years instead of spending endless hours
> fixing warnings and doing bug-hunting on something produced by an
> automatic tool (which, in my opinion, will never be able to substitute a
> developer).
>
>
>
> Just my 2 cents.
>
>
> --
> S.
date: Thu, 21 Aug 2008 09:49:05 +0200
author: Patrice http://www.chez.com/scribe/
Re: Converting VB6 to C#
I'll be replying via your blog, but you've stated some items that are just
plain false:
- we do have command line options
- we do have multiple conversion approaches (project, solution, folder,
file, snippet, asp.net file & snippet)
- we do have a help file (included with the demo)
We didn't receive your email (perhaps blocked by our email filter?). You
shouldn't be making false claims about our product just because an email was
not answered/received. This is the first time I've heard of a review of
Instant C# based purely on the demo edition. Most authors would either
ensure that we are contacted for a full copy of the software or omit the
review.
--
http://www.tangiblesoftwaresolutions.com
C++ to C#
C++ to VB
C++ to Java
VB & C# to Java
Java to VB & C#
Instant C#: VB to C#
Instant VB: C# to VB
Instant C++: VB, C#, or Java to C++/CLI
"Cowboy (Gregory A. Beamer)" wrote:
> Consider VB Conversions. You can read my review and competitive analysis
> (with requisite disclaimer that one was a full version and another a demo):
> http://gregorybeamer.spaces.live.com/blog/cns!B036196EAF9B34A8!786.entry
>
> --
> Gregory A. Beamer
> MVP, MCP: +I, SE, SD, DBA
>
> Subscribe to my blog
> http://feeds.feedburner.com/GregoryBeamer#
>
> or just read it:
> http://feeds.feedburner.com/GregoryBeamer
>
> ********************************************
> | Think outside the box! |
> ********************************************
> "Stephen" wrote in message
> news:c5760f3e-8004-42e2-8627-a97992c2d34a@w1g2000prk.googlegroups.com...
> >I have a large VB6 code base that I need to convert to C#. I am
> > assuming that the best approach would be to first convert it to VB.NET
> > and get it into a compilable state, then to convert it to C# from
> > VB.NET.
> >
> > Problem: I see a lot of converters out there that do a pretty good
> > job of performing the conversion. But most of the ones I see do this
> > on a file by file basis rather than a project by project basis.
> >
> > So: what's the best converter out there that will take a VB.NET
> > project as input and produce a C# project with converted code as
> > output?
> >
> > Thanks,
> >
> > Stephen
>
>
date: Thu, 21 Aug 2008 08:56:01 -0700
author: David Anton
Re: Converting VB6 to C#
So you're saying the review is no good? :-)
--
Regards,
Alvin Bruney [MVP ASP.NET]
[Shameless Author plug]
Download OWC Black Book, 2nd Edition
Exclusively on www.lulu.com/owc $15.00
Need a free copy of VSTS 2008 w/ MSDN Premium?
http://msmvps.com/blogs/alvin/Default.aspx
-------------------------------------------------------
"David Anton" wrote in message
news:F29745E3-03AB-4677-BB1D-17F771D52001@microsoft.com...
> I'll be replying via your blog, but you've stated some items that are just
> plain false:
> - we do have command line options
> - we do have multiple conversion approaches (project, solution, folder,
> file, snippet, asp.net file & snippet)
> - we do have a help file (included with the demo)
>
> We didn't receive your email (perhaps blocked by our email filter?). You
> shouldn't be making false claims about our product just because an email
> was
> not answered/received. This is the first time I've heard of a review of
> Instant C# based purely on the demo edition. Most authors would either
> ensure that we are contacted for a full copy of the software or omit the
> review.
> --
> http://www.tangiblesoftwaresolutions.com
> C++ to C#
> C++ to VB
> C++ to Java
> VB & C# to Java
> Java to VB & C#
> Instant C#: VB to C#
> Instant VB: C# to VB
> Instant C++: VB, C#, or Java to C++/CLI
>
>
> "Cowboy (Gregory A. Beamer)" wrote:
>
>> Consider VB Conversions. You can read my review and competitive analysis
>> (with requisite disclaimer that one was a full version and another a
>> demo):
>> http://gregorybeamer.spaces.live.com/blog/cns!B036196EAF9B34A8!786.entry
>>
>> --
>> Gregory A. Beamer
>> MVP, MCP: +I, SE, SD, DBA
>>
>> Subscribe to my blog
>> http://feeds.feedburner.com/GregoryBeamer#
>>
>> or just read it:
>> http://feeds.feedburner.com/GregoryBeamer
>>
>> ********************************************
>> | Think outside the box! |
>> ********************************************
>> "Stephen" wrote in message
>> news:c5760f3e-8004-42e2-8627-a97992c2d34a@w1g2000prk.googlegroups.com...
>> >I have a large VB6 code base that I need to convert to C#. I am
>> > assuming that the best approach would be to first convert it to VB.NET
>> > and get it into a compilable state, then to convert it to C# from
>> > VB.NET.
>> >
>> > Problem: I see a lot of converters out there that do a pretty good
>> > job of performing the conversion. But most of the ones I see do this
>> > on a file by file basis rather than a project by project basis.
>> >
>> > So: what's the best converter out there that will take a VB.NET
>> > project as input and produce a C# project with converted code as
>> > output?
>> >
>> > Thanks,
>> >
>> > Stephen
>>
>>
date: Thu, 21 Aug 2008 20:13:22 -0400
author: Alvin Bruney [ASP.NET MVP] vapor dan using hot male spam filter
Re: Converting VB6 to C#
A bad review I can take - we're happy to accept and fix the two bugs he
pointed out.
However, blatently false information is not acceptable (we *do* have a help
file, we *do* have command line features, we *do* have many conversion
approaches beyond mere folder or snippet conversion).
--
http://www.tangiblesoftwaresolutions.com
C++ to C#
C++ to VB
C++ to Java
VB & C# to Java
Java to VB & C#
Instant C#: VB to C#
Instant VB: C# to VB
Instant C++: VB, C#, or Java to C++/CLI
"Alvin Bruney [ASP.NET MVP]" wrote:
> So you're saying the review is no good? :-)
>
> --
>
> Regards,
> Alvin Bruney [MVP ASP.NET]
>
> [Shameless Author plug]
> Download OWC Black Book, 2nd Edition
> Exclusively on www.lulu.com/owc $15.00
> Need a free copy of VSTS 2008 w/ MSDN Premium?
> http://msmvps.com/blogs/alvin/Default.aspx
> -------------------------------------------------------
>
>
> "David Anton" wrote in message
> news:F29745E3-03AB-4677-BB1D-17F771D52001@microsoft.com...
> > I'll be replying via your blog, but you've stated some items that are just
> > plain false:
> > - we do have command line options
> > - we do have multiple conversion approaches (project, solution, folder,
> > file, snippet, asp.net file & snippet)
> > - we do have a help file (included with the demo)
> >
> > We didn't receive your email (perhaps blocked by our email filter?). You
> > shouldn't be making false claims about our product just because an email
> > was
> > not answered/received. This is the first time I've heard of a review of
> > Instant C# based purely on the demo edition. Most authors would either
> > ensure that we are contacted for a full copy of the software or omit the
> > review.
> > --
> > http://www.tangiblesoftwaresolutions.com
> > C++ to C#
> > C++ to VB
> > C++ to Java
> > VB & C# to Java
> > Java to VB & C#
> > Instant C#: VB to C#
> > Instant VB: C# to VB
> > Instant C++: VB, C#, or Java to C++/CLI
> >
> >
> > "Cowboy (Gregory A. Beamer)" wrote:
> >
> >> Consider VB Conversions. You can read my review and competitive analysis
> >> (with requisite disclaimer that one was a full version and another a
> >> demo):
> >> http://gregorybeamer.spaces.live.com/blog/cns!B036196EAF9B34A8!786.entry
> >>
> >> --
> >> Gregory A. Beamer
> >> MVP, MCP: +I, SE, SD, DBA
> >>
> >> Subscribe to my blog
> >> http://feeds.feedburner.com/GregoryBeamer#
> >>
> >> or just read it:
> >> http://feeds.feedburner.com/GregoryBeamer
> >>
> >> ********************************************
> >> | Think outside the box! |
> >> ********************************************
> >> "Stephen" wrote in message
> >> news:c5760f3e-8004-42e2-8627-a97992c2d34a@w1g2000prk.googlegroups.com...
> >> >I have a large VB6 code base that I need to convert to C#. I am
> >> > assuming that the best approach would be to first convert it to VB.NET
> >> > and get it into a compilable state, then to convert it to C# from
> >> > VB.NET.
> >> >
> >> > Problem: I see a lot of converters out there that do a pretty good
> >> > job of performing the conversion. But most of the ones I see do this
> >> > on a file by file basis rather than a project by project basis.
> >> >
> >> > So: what's the best converter out there that will take a VB.NET
> >> > project as input and produce a C# project with converted code as
> >> > output?
> >> >
> >> > Thanks,
> >> >
> >> > Stephen
> >>
> >>
date: Thu, 21 Aug 2008 17:27:02 -0700
author: David Anton
Re: Converting VB6 to C#
I'd argue the other way around. Large institutions should have the
resources to be able to handle something like that, and frankly shouldn't
let it get into 2008 before they start considering a rewrite of a VB6
application. Arguably, large institutions wouldn't be writing LOB apps in
VB6 in the first place, but that's an argument for another thread.
I don't think it matters as to the size of the organisation, they'll be
doing themselves a disservice by trying to convert what needs rewriting.
Conversion is going to end up as a half assed solution at best.
"Alvin Bruney [ASP.NET MVP]" <vapor dan using hot male spam filter> wrote in
message news:96186E04-C494-404D-8A39-13123E2B4456@microsoft.com...
> small shops? that approach is ok. Large institutions can easily run up a
> multi million dollar tab for a rewrite of a critical LOB. An automated
> port is significantly cheaper and is a low hanging fruit that stake
> holders will more easily head for.
>
> --
>
> Regards,
> Alvin Bruney [MVP ASP.NET]
>
> [Shameless Author plug]
> Download OWC Black Book, 2nd Edition
> Exclusively on www.lulu.com/owc $15.00
> Need a free copy of VSTS 2008 w/ MSDN Premium?
> http://msmvps.com/blogs/alvin/Default.aspx
> -------------------------------------------------------
>
>
> "Alex Clark" <quanta@noemail.noemail> wrote in message
> news:eqKym$7AJHA.5316@TK2MSFTNGP04.phx.gbl...
>> Personally I wouldn't even consider it.
>>
>> Anything written in VB6 would likely benefit hugely from a rewrite rather
>> than a code-gen conversion. You'll be able to refactor your code to take
>> advantage of the enormous language enhancements that have been made over
>> the years, and VB6 wasn't even truly an OO language, so there'll be
>> plenty of extra functionality to exploit from the compiler there. I
>> don't think there's any quick fix for what you want, no matter how good
>> the converters are today.
>>
>>
>> "Stephen" wrote in message
>> news:c5760f3e-8004-42e2-8627-a97992c2d34a@w1g2000prk.googlegroups.com...
>>>I have a large VB6 code base that I need to convert to C#. I am
>>> assuming that the best approach would be to first convert it to VB.NET
>>> and get it into a compilable state, then to convert it to C# from
>>> VB.NET.
>>>
>>> Problem: I see a lot of converters out there that do a pretty good
>>> job of performing the conversion. But most of the ones I see do this
>>> on a file by file basis rather than a project by project basis.
>>>
>>> So: what's the best converter out there that will take a VB.NET
>>> project as input and produce a C# project with converted code as
>>> output?
>>>
>>> Thanks,
>>>
>>> Stephen
>>
>>
date: Fri, 22 Aug 2008 00:18:32 -0500
author: Alex Clark ail
Re: Converting VB6 to C#
Our experiences differ greatly and that's where I'll leave it.
--
Regards,
Alvin Bruney [MVP ASP.NET]
[Shameless Author plug]
Download OWC Black Book, 2nd Edition
Exclusively on www.lulu.com/owc $15.00
Need a free copy of VSTS 2008 w/ MSDN Premium?
http://msmvps.com/blogs/alvin/Default.aspx
-------------------------------------------------------
"Alex Clark" <quanta@noemail.noemail> wrote in message
news:e2v3PaBBJHA.4496@TK2MSFTNGP02.phx.gbl...
> I'd argue the other way around. Large institutions should have the
> resources to be able to handle something like that, and frankly shouldn't
> let it get into 2008 before they start considering a rewrite of a VB6
> application. Arguably, large institutions wouldn't be writing LOB apps in
> VB6 in the first place, but that's an argument for another thread.
>
> I don't think it matters as to the size of the organisation, they'll be
> doing themselves a disservice by trying to convert what needs rewriting.
> Conversion is going to end up as a half assed solution at best.
>
>
>
>
> "Alvin Bruney [ASP.NET MVP]" <vapor dan using hot male spam filter> wrote
> in message news:96186E04-C494-404D-8A39-13123E2B4456@microsoft.com...
>> small shops? that approach is ok. Large institutions can easily run up a
>> multi million dollar tab for a rewrite of a critical LOB. An automated
>> port is significantly cheaper and is a low hanging fruit that stake
>> holders will more easily head for.
>>
>> --
>>
>> Regards,
>> Alvin Bruney [MVP ASP.NET]
>>
>> [Shameless Author plug]
>> Download OWC Black Book, 2nd Edition
>> Exclusively on www.lulu.com/owc $15.00
>> Need a free copy of VSTS 2008 w/ MSDN Premium?
>> http://msmvps.com/blogs/alvin/Default.aspx
>> -------------------------------------------------------
>>
>>
>> "Alex Clark" <quanta@noemail.noemail> wrote in message
>> news:eqKym$7AJHA.5316@TK2MSFTNGP04.phx.gbl...
>>> Personally I wouldn't even consider it.
>>>
>>> Anything written in VB6 would likely benefit hugely from a rewrite
>>> rather than a code-gen conversion. You'll be able to refactor your code
>>> to take advantage of the enormous language enhancements that have been
>>> made over the years, and VB6 wasn't even truly an OO language, so
>>> there'll be plenty of extra functionality to exploit from the compiler
>>> there. I don't think there's any quick fix for what you want, no matter
>>> how good the converters are today.
>>>
>>>
>>> "Stephen" wrote in message
>>> news:c5760f3e-8004-42e2-8627-a97992c2d34a@w1g2000prk.googlegroups.com...
>>>>I have a large VB6 code base that I need to convert to C#. I am
>>>> assuming that the best approach would be to first convert it to VB.NET
>>>> and get it into a compilable state, then to convert it to C# from
>>>> VB.NET.
>>>>
>>>> Problem: I see a lot of converters out there that do a pretty good
>>>> job of performing the conversion. But most of the ones I see do this
>>>> on a file by file basis rather than a project by project basis.
>>>>
>>>> So: what's the best converter out there that will take a VB.NET
>>>> project as input and produce a C# project with converted code as
>>>> output?
>>>>
>>>> Thanks,
>>>>
>>>> Stephen
>>>
>>>
>
>
date: Fri, 22 Aug 2008 17:45:16 -0400
author: Alvin Bruney [ASP.NET MVP] vapor dan using hot male spam filter
|
|