Windows 8 Phone应用程序的Assets文件夹 [英] Assets folder for Windows 8 Phone app

查看:85
本文介绍了Windows 8 Phone应用程序的Assets文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Android应用程序,现在正在移植到Windows Phone 8. 资产文件夹位于我的文件夹结构中的代码中.为了将其包含到Android版本中,我使用<linkedResources>.

I have an app for Android that I'm porting to Windows Phone 8 now. The assets folder lies apart of code in my folder sturucture. In order to include it into Android build, I use <linkedResources>.

Windows Phone 8和MSVC是否有类似功能?检查了示例之后,我发现它们都将资产直接包含在Visual Studio的项目文件夹结构中.我可以避免将资产复制到MSVC项目文件夹中吗?

Is there anything similar for Windows Phone 8 and MSVC? Having examined examples, I found they all include assets directly into project folder structure in Visual Studio. Can I avoid copying assets into MSVC project folder?

顺便说一句,我的MSVC 2013在Add按钮上没有下拉框:

BTW, my MSVC 2013 does not have drop box on Add button:

推荐答案

当存在常见的entity代码文件时,这是一个古老的Silverlight技巧,需要在应用程序和服务之间共享这些无法共享库的代码文件由于.Net的差异.

This an old Silverlight trick when there was common entity code files which needed to be shared between the app and the service where the library could not be brought in due to the differences in .Net.

诀窍是将其作为链接包含到项目中.这是

The trick is to include as a link into the project. Here is how

  1. 在WP8电话项目的资产文件夹中,右键单击并选择Add,然后选择Existing Item...shift alt A.
  2. 浏览到android项目中找到的文件的位置,然后选择文件.
  3. 选择项目后,在Add按钮上选择下拉箭头.
  4. 选择Add as link将图像作为链接添加到文件夹中.
  1. In the assets folder of the WP8 phone project right click and select Add then Existing Item... or shift alt A.
  2. Browse to the location of the file(s) found in the android project and select the file(s).
  3. Once the item(s) have been selected, then on the Add button select the drop down arrow.
  4. Select Add as link to add the image(s) as a link into the folder.

这将授予对文件的访问权限,就好像文件实际上位于项目的Asset文件夹中,但该文件实际上位于其他位置.

That will give access to the file as if the file was actually within the project's Asset folder, but the file physically resides elsewhere.

这篇关于Windows 8 Phone应用程序的Assets文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆