What is the compatibility between a WinRT class library and Windows Phone 8?

后端 未结 2 1650
没有蜡笔的小新
没有蜡笔的小新 2021-01-26 06:14

I want to have a class library that will run under WinRT and also Windows Phone 8. What do I need to do?

2条回答
  •  臣服心动
    2021-01-26 07:02

    +1 on Cerebrate's answer. portable class libraries is the way to go.

    However, PCL aren't a magic wand and won't bridge many of the inconsistencies between WP8 and Win8. For more hardcore code sharing you'll need to consider sharing C# files, adding conditional compilation and many other tricks. Nokia has a great article on WP7 and WP8 code sharing that would apply to this case as well @ http://www.developer.nokia.com/Resources/Library/Lumia/#!co-development-and-porting-guide.html

    There's also this great Nokia Wiki article with similar intents @ http://www.developer.nokia.com/Community/Wiki/Maintaining_a_WP7_and_WP8_version_of_a_same_Silverlight_application

提交回复
热议问题