Windows 8 Store App with Windows Phone App

断了今生、忘了曾经 提交于 2019-12-13 08:27:47

问题


May I know, can

  1. A Windows 8 Store App source project (Metro), link with binary reference initially created for Windows Phone 7?
  2. A Windows 8 Store App source project (Metro), link with binary reference initially created for Windows Phone 8?
  3. A binary Windows 8 Store App, run in Windows Phone 8?

I had tested (1) so far, by compiling a Windows 8 Store App project using Microsoft Face SDK for WP7. I get a mystery compilation error.

The "GenerateResource" task failed unexpectedly. System.InvalidOperationException: Item named 'resources/template/background/beard.01.jpg' of type 'System.IO.UnmanagedMemoryStream' cannot be added to the resource file because it is not serializable.

[... more goes here]

So, may I know [2] and [3] would work?


回答1:


As far as I know the answer is 1. no, 2. no and 3. no.

Windows Phone 7 and WinRT are completely different platforms.
Windows 8 and Windows Phone 8 shares part of WinRT, but there are still differences in available APIs. There are parts of the API available for Windows 8 and not for Windows Phone 8 and same works in the other direction too.

The best you can do is use Portable Class Libraries targeting both WinRT and Windows Phone 8 - this way you can use API available in both platforms and you can reference the created library both in WP8 and Windows 8 projects.



来源:https://stackoverflow.com/questions/12831850/windows-8-store-app-with-windows-phone-app

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