views:

416

answers:

7

We have a project with over 500,000 lines of VB.NET that we need to convert to C#. Any recommendations, based on experience, for tools to use? We are using Visual Studio 2008 and we're targeting 3.5 .

+3  A: 

Reflector will decompile the IL and produce C# for you, it will be rough, but a decent start.

FlySwat
+1  A: 

I've used this site for a while now for some of my smaller conversions. It has been quite reliable.

According to the site, their converter is based off an open source IDE that has the converter built in, so you might try the "source site" as well.

Dillie-O
+2  A: 

There used to be an add-in to Reflector which creates a complete Visual Studio solution. However, I don't know if it's still available or working, now that Red Gate has taken over Reflector.

Thomas Eyde
+1  A: 

SharpDevelop has a converter built-in IIRC.

Geoffrey Chetwood
+3  A: 

Did this eval a while back. You will find a lot of "free" solutions that are horrible at edge cases. This commercial product http://www.tangiblesoftwaresolutions.com is by no means perfect; but, was the best we could find at the time doing real conversion tests. Note: I am speaking only as a customer. If someone has found a solution that in real-world use produces better conversions than this, please let me know.

Tangible is the best one I found; be thankful you don't have to go the other way though it's a bit messier!
Martin Clarke
+7  A: 

I would concur with the comment. You have 500,000 of tried and true VB.Net code. Why on earth would you waste any time changing that? No one says that you can't write all new components in C#.

I would consider not worrying about a tool and instead ask yourself, truly, why you are doing this.

Charles Graham
That's a great question. Right now, my day starts off in VB.Net 1.1 and ends using C# 3.5. After about 18 months of working in two languages and seeing that every new project is written in C#, it's become apparent that our team codes faster in C# - but only because we spend so much time using it.
Mike
I prefer c# myself, but agree that I would much rather leave the VB.net code as is. What is the value added by doing the conversion?
RQDQ
+1  A: 

The converter from Telerik works well.

http://converter.telerik.com/
http://converter.telerik.com/batch.aspx

yakdan