How do I build an application that targets both WPF and Silverlight?
This question comes up quite a bit as I talk to people about both WPF and Silverlight. Whenever I am asked this question, I always respond by letting people know that v2 of the patterns & practices Composite Application Guidance for WPF (code name PRISM) is adding support for Silverlight 2. Although, the overall purpose of the guidance is about building composite applications, v2 also has solid guidance on how to multi-target WPF & Silverlight using shared code where possible. If you are interested in this scenario, then I would recommend downloading the latest drop and reading through the guidance. You can follow the project from the codeplex site:
As of this post, the most recent drop (7) is here:
You don’t have to download all the bits since the help file is available standalone. If you want to go straight to the multi-targeting topics, then I recommend reading things in the following order:
Silverlight versus WPF
Multi-Targeting Design Concept
Mutli-Targeting Technical Concept
Project Linker: Synchronization Tool