is there a way to disable visual basic 10 language features in VS 2010. our Dev team has moved to Visual studio 2010, but we still have to keep backwards compatibility with Visual Studio 2008. is there a way to disable the new language features to avoid any issues.
+3
A:
The VB.NET compiler has the /langversion command line option. It is supported by msbuild but not the IDE. Sloppy, but fixable. Open the .vbproj in, say, notepad and paste this XML, right after the Project element:
<PropertyGroup>
<LangVersion>9</LangVersion>
</PropertyGroup>
Hans Passant
2010-05-21 17:56:40
I've removed my own answer. Hans has the better answer hands-down. This also works in C#, but the setting for LangVersion should be "3" for compatibility with .NET 3.x and VS 2008.
Stephen M. Redd
2010-05-21 18:17:57
The C# IDE allows you to set this from the Project + Properties, Build tab.
Hans Passant
2010-05-21 18:30:13
Deleted my answer too, what an awesome obscure tidbit
BlueRaja - Danny Pflughoeft
2010-05-21 20:07:26