Windows Phone 7/WPF - Sharing a codebase

被刻印的时光 ゝ 提交于 2019-12-06 07:12:13

问题


I've developed Windows Mobile apps in the past and have always found that when trying to share a codebase with Windows (Winforms/WPF) apps, generally things get very difficult. Has this changed with Windows Phone 7? It would be great to add a WP7 app to a solution containing a WPF app and ASP.NET site and have everything share the same code base.


回答1:


Have a look at the Portable Library Tools CTP here

It's a Visual Studio add-in that enables you to create libraries that run on a variety of .NET platforms without recompilation.




回答2:


You'll find the Portable Library Tools mentioned by Steve Chadbourne handy for sharing code and your project layout. However you will find some capability differences from Silverlight Mobile, Silverlight desktop and WPF.

Unfortunately nothing can be totally compatible because the various platforms are different. A phone can't include the entire .NET framework.

You'll find it hit or miss. While WPF, Silverlight and Silverlight mobile share many classes and API's, you'll find things like sockets missing on Windows Phone 7 where you had sockets in the .NET Compact Framework v1 to v3.5.



来源:https://stackoverflow.com/questions/5522355/windows-phone-7-wpf-sharing-a-codebase

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!