WinRT 类库与 Windows Phone 8 之间的兼容性如何? [英] What is the compatibility between a WinRT class library and Windows Phone 8?
问题描述
我想要一个可以在 WinRT 和 Windows Phone 8 下运行的类库.我需要做什么?
I want to have a class library that will run under WinRT and also Windows Phone 8. What do I need to do?
推荐答案
为此,您需要将类库构建为可移植类库,这将创建一个可在多个平台上运行的程序集.(否则,WinRT 和 Windows Phone 8 的程序集本质上是不可互换的.)
To do that, you need to build your class library as a Portable Class Library, which creates an assembly that will run on multiple platforms. (Otherwise, assemblies for WinRT and Windows Phone 8 are essentially non-interchangeable.)
Visual Studio 2012 包含一个项目类型,可让您轻松完成此操作;还有一个可以在 VS 2010 上执行此操作的可下载工具集.
Visual Studio 2012 includes a project type that will let you do this easily; there is also a downloadable toolset that will let do this on VS 2010.
可用的框架功能仅限于在您支持的所有平台上可用的功能的一个子集.
The framework functionality available is limited to a subset of that which is available on all of the platforms you are supporting.
完整的详细信息可从 MSDN 获得,这里:http://msdn.microsoft.com/en-us/library/gg597391.aspx
Full details are available from MSDN, here: http://msdn.microsoft.com/en-us/library/gg597391.aspx
这篇关于WinRT 类库与 Windows Phone 8 之间的兼容性如何?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!