如何以编程方式从 feature.xml 文件获取 sharepoint 功能版本?
我最近有下一个任务:每次构建项目时增加共享点功能的版本。我已经使用 feature.xml 文件中的属性“Version”成功完成了它。我将其更改为在 MSBuild 中执行自定义代码。那么,xml 文件中的功能版本发生了变化,但是当功能运行时,如何以编程方式获取它呢?我使用 SharePoint Server 2007、Visual studio 2008。如果有任何帮助,我将不胜感激。谢谢。 PS SPFarm.Local.BuildVersion 包含另一个版本,与 feature.xml 文件中的版本不同。
I have got the the next task recently: increment the version of the sharepoint feature each time when we are building the project. I have completed it successfully using the attribute "Version" in feature.xml file. I change it executing the custom code within MSBuild. So, the feature version in xml file changes, but how can I get it programmatically when the feature is working? I use SharePoint Server 2007, Visual studio 2008. I'll appreciate any help. Thank you.
P.S. SPFarm.Local.BuildVersion contains another version, which is different from the version in feature.xml file.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
试试这个:
此外,如果您位于功能事件接收器内部并尝试获取其版本,您可以执行以下操作:
Try this:
Also, if you're inside the feature event receiver and are trying to get its version, you can do: