We've traditionally gone a different route, so long as you can invest an hour or two to set this up - at least if you want to be able to do parallel development.
Generally, I think you need to do two things to achieve a single codebase that can build against multiple versions of Revit.
1. You need to Reference the different DLLs for each respective version.
2. You need to have conditional code for places where the code differs.
We did this by:
1. Setting up different Project/Solution configurations (i.e. Release 2009/Debug 2009/Release 2010/Debug 2010).
2. The tricky part is getting the appropriate DLL referenced for each configuration - you can achieve this by hand editing the CSPROJ file. If you find the References section, it is possible to create multiple entries for each project configuration using the "Condition" statement, i.e.:
Code:
<Reference Include="RevitAPI, Version=2009.0.0.0, Culture=neutral, processorArchitecture=x86" Condition=" '$(Configuration)' == 'Release2009' ">
<HintPath>..\..\..\Libs\2009\RevitAPI.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="RevitAPI, Version=2010.0.0.0, Culture=neutral, processorArchitecture=x86" Condition=" '$(Configuration)' == 'Debug2010' ">
<HintPath>..\..\..\Libs\2010\RevitAPI.dll</HintPath>
<Private>False</Private>
</Reference>
3. Use conditional compilation directives. In your new project configurations, under the Project Properties, you can add "Define" statements (sort of like "DEBUG" is predefined for the default Debug configuration). We add define statements like "REVIT2010" to the appropriate projects, then use it in the code as:
Code:
#ifdef REVIT2009
// do something here that only works in 2009
#else
// do the "new" way here
#endif
Good Luck!