I need to create some basic libraries in my application that will be available in both .NET 3.5 and .NET 4.0. I am happy to create several projects by creating the necessary definitions and using #ifdef to control which code to make it into the output assembly.
However, what I would like to know is there a way to synchronize these projects? When I develop for XNA, I have a Windows assembly and a Windows Phone assembly, and XNA injects the property into a project file called XnaCrossPlatformGroupID . What he does with this is to let Visual Studio automatically track that when a file is added to the project, it is added to the corresponding project. For example, if I add a file called Foo.cs to a copy of my Windows project, then the same file will be added to the copy of the Windows Phone project.
Is there a way to replicate this behavior for a regular set of projects in Visual Studio? I would prefer not to use the build configuration, since I would like to compile all the target platforms in one step, without resorting to tools outside the IDE (for example, TeamCity). Or is there another method that allows you to build a project against several goals without overloading the solution using 20 different build configurations?
source share