Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago.
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.
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)
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.
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.
The far best tool for this is Econ Netvert which can be found on CodePlex
http://www.codeplex.com/econnetvert
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.
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.
There's also the free online converters up at developerfusion :)
SharpDevelop is quite good, but at my company we've found VBConversions to provide a much more complete conversion. It's a commerical app though, but for the time saved over SharpDevelop it was a no-brainer for us.
As a specific example, one thing we found that SharpDevelop didn't convert correctly was VB indexes, which use curvy brackets. It seemed unable to distinguish between indexes and method calls so didn't convert the indexes to square brackets. VBConversions converted them fine. This one thing made it worth its purchase for us.
It looks like the Tangible Software product works very similarly to VBConversions.