locked
Change solution Project vb.Net to C# RRS feed

  • Question

  • I want to change Vb.Net Solution Project in C#
    Saturday, October 12, 2019 2:15 PM

Answers

  • Hello,

    A Visual Studio solution is language agnostic, meaning a solution is a container for any type of projects available and the project or projects can be mixed meaning one project is VB.NET, another C# and another F#.

    If the intent is to convert from VB.NET to C# there are converters available yet you still need basic knowledge of C#, for instance an array in VB.NET someByteArray As Byte() while C# is byte[] someByteArray. A converter gets you so far then you take over. Doing an entire project with a paid converter tends to treat the project slightly different than a native C# project too.


    Please remember to mark the replies as answers if they help and unmarked them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.

    NuGet BaseConnectionLibrary for database connections.

    StackOverFlow
    profile for Karen Payne on Stack Exchange

    • Marked as answer by CompuTechSide Saturday, October 12, 2019 5:29 PM
    Saturday, October 12, 2019 2:44 PM
  • Deleted
    • Marked as answer by CompuTechSide Saturday, October 12, 2019 5:29 PM
    Saturday, October 12, 2019 3:39 PM

All replies

  • The easiest way to do it is to simply delete the VB.NET project from the solution and add a new C# project to the solution. After all, the files that were inside the old project are all vb, so they are no longer useful for the new c# project. Of course, if you mistakenly do have any c# files in the old vb project you can simply copy them over to the new c# project.
    Saturday, October 12, 2019 2:21 PM
  • Hello,

    A Visual Studio solution is language agnostic, meaning a solution is a container for any type of projects available and the project or projects can be mixed meaning one project is VB.NET, another C# and another F#.

    If the intent is to convert from VB.NET to C# there are converters available yet you still need basic knowledge of C#, for instance an array in VB.NET someByteArray As Byte() while C# is byte[] someByteArray. A converter gets you so far then you take over. Doing an entire project with a paid converter tends to treat the project slightly different than a native C# project too.


    Please remember to mark the replies as answers if they help and unmarked them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.

    NuGet BaseConnectionLibrary for database connections.

    StackOverFlow
    profile for Karen Payne on Stack Exchange

    • Marked as answer by CompuTechSide Saturday, October 12, 2019 5:29 PM
    Saturday, October 12, 2019 2:44 PM