Mixing Visual Studio 2008 and 2010
Developers can upgrade to Visual Studio 2010 while other team members on the same project are still using Visual Studio in 2008. But in order to do so you need to know a few tricks such as the langversion flag.
To begin with a copy of the current solution file must be made. This is necessary because, unlike project files, solution files are not backwards compatible. Once the copy is made you can perform the usual solution upgrade as if you were permanently moving to a new version of Visual Studio.
The next step is to ensure that the upgrade process didn’t break to the VS 2008 solution. Under the tests we have run so far the only negative effect was a couple of warnings emitted during the build process.
You will have to continue using the .NET 2.0 series of libraries, but the normal target framework settings are enough to account for that. The tricky part is to avoid using any new language features from VB 10 or C# 4. This is where the langversion flag comes into play. This flag restricts the compiler to a specific version of the language. For C# that means the 2003 ISO specification, the 2006 ISO specification, or C# 3.0. In Visual Basic you can choose between VB 9 or VB 10.
C# allows you to set this flag in the Advanced menu of the Build tab. For Visual Basic you will have to manually edit the project file so that it includes the below line.
<PropertyGroup> <LangVersion>9</LangVersion> </PropertyGroup>
Please note that these instructions are primarily for class libraries, console, and Windows applications. ASP.NET projects have their own quirks and may additional issues not addressed here.
Uwe Zdun, Rafael Capilla, Huy Tran, Olaf Zimmermann Mar 09, 2014
Olav Maassen, Liz Keogh & Chris Matts Mar 08, 2014