简体   繁体   中英

Convert a VB project to C# Visual Studio 2012

I have a fairly straight-forward question.

I have been working on a .NET web development project for about two weeks now, and I JUST got Visual Studio 2012 and I very much THOUGHT I had set it up to default to C# projects. Silly me.

I have not written a single solitary line of code yet, so when I finally roll up my sleeves and prepare to dive in to writing some code...I encounter the unpleasant surprise that I have developed the entire interface of the application without realizing this is a VB project, not a C# one.

I do not have ANY code to translate, I just want to know if there is a way to just change it over to C# without having to recreate the whole project in another file.

Since the work you've done is non .NET I recommend creating a new C# project and porting it over.

However I recommend:

  • The VB.NET project is in source control and fully checked in
  • You create a new C# project so you can work on them side-by-side

You can use a diff editor such as WinMerge to ensure the important files are moved and are kept the same relative to each other.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM