Assets folder for Windows 8 Phone app

戏子无情 提交于 2020-01-05 09:07:21

问题


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>.

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?

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


回答1:


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. 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.

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.



来源:https://stackoverflow.com/questions/24432598/assets-folder-for-windows-8-phone-app

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