How-To MultiTarget Both SilverLight 4 and WPF Application?

337 Views Asked by At

How can I MultiTarget Both SilverLight 4 and WPF Application ?

2

There are 2 best solutions below

1
On BEST ANSWER

The standard approach is to create a solution that contains a WPF project and a Silverlight project, both created using the new project wizard or one can be your existing project. Then add files in one project to the other project using links (Add -> Existing Item -> Add -> Drop-down arrow -> Add as link). Then use #if SILVERLIGHT to handle any platform differences.

0
On

As far as I know you will probably work with compiler flags. Why not learn from a project that does target WPF, Silverlight etc.? You could e.g. check out Caliburn.Micro