简体   繁体   English

Package xml 文件与 silverlight xap output

[英]Package xml file with silverlight xap output

I have a Silverlght library project that produces a dll output. This project utilises a xml file for parsing etc.我有一个生成dll output 的 Silverlght 库项目。该项目使用 xml 文件进行解析等。
There is a second project that references the Dll project to get the built dll files and package into a xap.有第二个项目引用 Dll 项目来获取构建的dll文件和 package 到 xap 中。
However, when I run my silverlight web application project, it gives me an error that there is no xyz.xml file found然而,当我运行我的 silverlight web 应用程序项目时,它给我一个错误,没有找到 xyz.xml 文件
What properties of the.xml file do I need to change so tha it goes with the dll in the xap file?我需要更改 .xml 文件的哪些属性,以便它与 xap 文件中的 dll 一起使用?

EDIT编辑

Setting the Build action to Embedded Resource gives the timing.xml as a separate file in the bin/Debug folder when looked in Windows Explorer.当在 Windows Explorer 中查看时,将 Build 操作设置为 Embedded Resource 会将 timing.xml 作为 bin/Debug 文件夹中的一个单独文件。
Setting the Build action to Resource does not give timing.xml as a separate file in the bin.Debug folder, but only a single dll .将 Build 操作设置为 Resource 不会将 timing.xml 作为 bin.Debug 文件夹中的单独文件,而只会提供一个dll I don't know if it gets packaged with the.dll file in this way but it is still not in the.xap file that is prepared after that.我不知道它是否以这种方式与.dll文件打包在一起,但它仍然不在之后准备的.xap文件中。

The project that produces dll is referenced by another project that produces xap.生成 dll 的项目被另一个生成 xap 的项目引用。

If you set build action of the.xml file to Content , the file will be included in the application package without embedding it in the project assembly.如果将 .xml 文件的构建操作设置为Content ,则该文件将包含在应用程序 package 中,而不会将其嵌入到项目程序集中。 Resource build action will embed the file in the project assembly. Resource构建操作会将文件嵌入到项目程序集中。

Resource Files . 资源文件

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM