I am writing an app that would work for both .NET and Mono. However components of it would only be available for one or the other. For example, a modular part of the app use WPF, which is not available in Mono (it would not even build!!!). Another part of the app uses PInvoke on a libpango, which is normally only available on Unix.
Is it possible to target individual platform with Visual Studio with different build parameter for each?
Currently The modular parts are not in their own project file, but I can easily move them to.
#define/#if blocks are one method for doing this. There is also a conditional attribute. You might also want to look into MSBuild targets.
You might also want to think about your class design and whether you can share have shared interfaces that enable more of a provider or “plug-in” model to support different platforms. Microsoft developed a Portable Libraries project type that might help with this.