简体   繁体   中英

How-To MultiTarget Both SilverLight 4 and WPF Application?

如何同时对SilverLight 4和WPF应用程序进行多目标处理?

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.

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 eg check out Caliburn.Micro

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM