views:

1353

answers:

8

Hi

Can anyone recommend a good application that could be used to convert VB.NET projects to C#, without having to do too much manual work?

We've used Reflector to do small libraries manually, but some of the larger projects will be too slow and complex to do this manually.

+2  A: 

SharpDevelop has this feature, but I haven't used it enough to know if works reliably. It seems to be a pretty good otherwise, so it's worth a try though.

recursive
Thanks. Looks interesting and worth a look.
Jayden
+1  A: 

Tangible Software do various converters, including VB to C#.

I've played with it a little bit as they're kind enough to give me a copy for free, but I can't say I've stress-tested it. When I've used it it's been fine though - certainly worth a try.

Jon Skeet
Hi. It looks good. It will cost us something to purchase, so we might give some of the other free ones a go first. If they can't do the job, this certainly looks like a goer.
Jayden
+2  A: 

The best and fast converter I have seen so far is http://converter.telerik.com/

Nicely presented using RAD AJAX Controls.

Note: It converts only code snippets and not projects as a whole.

Binoj Antony
Hi. Not what we are looking for. We can use reflector to accomplish this anyway. Thanks.
Jayden
+4  A: 

You can use Lutz Roeders Reflector (http://www.red-gate.com/products/reflector) which can decompile whole Assemblies into Visual Studio projects. This way you can convert from ANY .NET Langauge into one of the supported languages of this program (C#.VB.NET,MC++,Delphi,Chrome)

codymanix
Hi. You learn something every day. We've used Reflector alot, but never realised you could do this. Now that I know it doesn't it was easy to find the 'Export' function that did this ! Thanks.
Jayden
Of course, be wary of any EULAs that you might violate this way.
Jon Limjap
+1  A: 

A few things to keep in mind...

1) Depending on how the VB.Net code was written, automatic conversion may or may not be 100% possible. VB.Net allows a "looser" coding style that would be ambiguous to C#. So, some manual intervention may be needed.

2) If the VB.Net code functions correctly, you may want to just leave it as VB.Net. Both VB.Net and C# projects can co-exist within the same solution.

Mark Maslar
Thanks. Yes, we understand the limitations. If we only have to fix a few things manually, it will certainly be better than having to fix them all.
Jayden
+2  A: 

The far best tool for this is Econ Netvert which can be found on CodePlex http://www.codeplex.com/econnetvert

Thanks, looks like what we are looking for. Will give it a go. Cheers
Jayden
+1  A: 

There's also the free online converters up at developerfusion :)

James Crowley
A: 

Check this list of VB.Net to C# tools

Amr ElGarhy