How Convert VB Project to C# Project

C#.Netvb.netConverterSharpdevelop

C# Problem Overview


I have a project written in VB, and I need to convert the whole project to C# project. I don't want to do it file by file, I found some online converters, but they convert only lines of codes, not the whole project. I found on researches, and here was written that I saw this question , there was written that

"The best part about Sharpdevelop is it converts the whole project (source files) from VB and C# and the other way"

And I also researched on Google, that if you Right Click on the project, I found here , that "Right click on the project in the Projects window and select Convert - From VB.NET to C#". But when I right click on The Project in the Projects window, I can'd find that "Convert". Is there any tool I have to install for SharpDevelop and then I will be able to convert my project ? Thanks

C# Solutions


Solution 1 - C#

I am assuming you tried SharpDevelop 5 since the conversion feature was missing in that version.

The VB to C# code converter from the SharpDevelop team is now a standalone extension to Visual Studio. Once installed, you can convert an entire VB.NET project to C# by opening the solution, right clicking the solution node in the Solution Explorer and selecting Convert to C#.

Solution 2 - C#

Sorry but I've not come across any tools that will convert the entire project. I've just created a interim c# project and converted small parts at a section at time, in the past. The conversion is not a straight one-2-one code map for a variety of reasons due to the differences in the languages. Small steps and some good unit testing help speed things up. Alternatively if your code uses code generators tools supplied by CodesmithTools, they often have compiler switches that will help change .net languages. This will definitely help in my humble opinion.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionRomo DaneghyanView Question on Stackoverflow
Solution 1 - C#Matt WardView Answer on Stackoverflow
Solution 2 - C#Jamie ClaytonView Answer on Stackoverflow