Brett Ryan
Brett Ryan

Reputation: 28255

How do I default Visual Studio to C# projects instead of VB.NET?

Visual Studio 2010 keeps defaulting to VB.NET projects instead of C#, I imported my saved settings from 2008 which defaulted to C# projects which did not resolve the problem..

I always accidentally create VB.NET projects then slap myself in the face as I then proceed to delete the project and recreate a C# version of it.

Upvotes: 73

Views: 85204

Answers (2)

MrBoJangles
MrBoJangles

Reputation: 12237

Tools -> Import and Export Settings -> Import Selected Environment Settings... -> Make selection whether to save current settings -> Select C# under the default setting folder

Edit: Checking in with VS Pro 2019 and this appears to still be the flow.

Upvotes: 91

Nick Rolando
Nick Rolando

Reputation: 26157

Visual Studio (2008..and hopefuly '10 =x) defaults to whatever you chose as the last project's code language you created. Double check that yours isn't doing this >_< Try creating a new project in C# code, exit that project, and create another one and see what language it defaults to. If so, it will allow to keep your "Web Development Settings" rather that switch your main environment to C#, like the other solution suggests.

Upvotes: 4

Related Questions