WP7应用程序版本
Windows Phone 7 应用程序似乎有两个带有版本号的位置 - 一个位于 AssemblyInfo.cs 中(通过 AssemblyVersion
/AssemblyFileVersion
属性),另一个位于 WMAppManifest.xml。这两者似乎不相关——改变一个不会影响另一个。市场似乎使用了清单中的内容 - 有人可以确认这一点吗?
真正的问题是 - 如何以编程方式从清单中检索该清单以显示在“关于”屏幕上?
A Windows Phone 7 app, it seems, has two places with version number - one in AssemblyInfo.cs (via AssemblyVersion
/AssemblyFileVersion
attributes), the other is WMAppManifest.xml. Those two seem uncorrelated - changing one does not affect the other. The Marketplace, it seems, uses the one from the manifest - can someone please confirm this?
The real question is - how do I retrieve the one from manifest programmatically to display on the About screen?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
WmAppManifest.xml 编号正在使用中。前两位数字与 Marketplace 相关(更新时会检查),接下来的两位数字供您内部使用。
这是一个常规的 XML 文件,将其作为 XDocument 打开并解析它。 示例。
编辑:这个例子是无关的。对于仅版本,请使用:
The WmAppManifest.xml number is in use. First two digits are relevant for Marketplace (it is checked when you do the update) next two are for your internal usage.
This is a regular XML file, open it as a XDocument and parse it. An example.
EDIT: the example is extraneous. For just the version, use:
要从“WMappManifest.xml”获取应用程序版本,此解决方案可能比 lukas 解决方案更有效:
对于 WP7:
对于 WP8:
To get App Version from "WMappManifest.xml", this solution might be a bit more efficient than lukas solution:
For WP7:
For WP8: