dslVersion - 如何增加但仍然支持旧版本?
技术:Visual Studio 2010、Visual Studio 可视化和可视化建模 SDK
我们有一个商业 Visual Studio 2010 DSL,当我们发布新版本时,我们希望增加版本号。我打开 DslDefinition.dsl 并根据需要更新版本号,然后执行“转换所有模板”以使更改得到反映。 DslPackage“source.extension.vsixmanifest”得到很好的更新并显示新的版本号。
然而问题是,当有人使用更新版本 1.0.0.1 打开从版本 1.0.0.0 创建的模型时,他们无法打开该模型,原因似乎是 *.diagram 文件中的“dslVersion”是设置为 1.0.0.0 已过时,我可以通过手动更新 dslVersion 来修复,但似乎无法设置支持的版本范围。
有什么办法解决这个问题吗?
Tech: Visual Studio 2010, Visual Studio Visualization & Modeling SDK
We have a commercial Visual Studio 2010 DSL, when we release a new version we want to increment the version number. I open the DslDefinition.dsl and update the version number as required and then do a Transform all templates so that the changes get reflected. The DslPackage 'source.extension.vsixmanifest' gets updated fine and shows the new version number.
The issue is however is that when someone opens a model created from version 1.0.0.0 with the updated version 1.0.0.1 then they can't open the model, the reason seems to be that the 'dslVersion' in the *.diagram file is set to 1.0.0.0 which has been outdated, I can fix by manually updating the dslVersion but there seems to be no way to set a supported version range.
Is there any fix for this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我通过覆盖“*SerializationHelper”类中的“CheckVersion”方法解决了这个问题。我的实现如下。
I have solved this issue by overriding the 'CheckVersion' method which sits in the '*SerializationHelper' class. My implementation is below.