在同一个项目中使用 subsonic 2.x 和 3.x [英] use subsonic 2.x and 3.x in the same project

查看:28
本文介绍了在同一个项目中使用 subsonic 2.x 和 3.x的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可以混合使用吗?我这么问是因为我有一个使用 Subsonic 2.x 生成的类(在编译的 dll 中)的大项目,但想开始使用 3.x 来处理新东西.

Is it possible to mix them? I'm asking because I have a big project that uses Subsonic 2.x generated classes (in a compiled dll) but would like to start using 3.x for new stuff.

我昨晚在一个项目中尝试了它,在该项目中我同时引用了 subsonic.dll 和 subsonic.core.dll,但这对不明确的引用等不起作用.所以删除了 2.x,然后我的较旧的编译亚音速生成类,因为它们需要亚音速 2.1 才能运行.

I tried it last night with a project where I had references to both subsonic.dll and subsonic.core.dll but that didn't work with ambiguous references, etc. So removed 2.x and then got an issue with my older compiled subsonic generated classes in that they needed Subsonic 2.1 to run.

推荐答案

嗯...我认为您可能能够做到这一点的可能性很小,但是您需要使用完整的限定类名称(命名空间.class) 用于很多代码,因为可能存在命名冲突.这并不容易,绝对不推荐.(它甚至可能无法完成.)

Hmm... I think there's a small chance that you might be able to do this, but you'd need to use the full qualifying class names (namespace.class) for a lot of code because there might be naming conflicts. It wouldn't be easy to do and definitely not recommended. (It might not can even be done.)

如果不进行大量重新编码,就无法从 2.x 迁移到 3.x.我在 2.2 中有很多大项目,在尝试更新到 3.0 后,我遇到了一些问题,所以我决定将它们保留在 2.2 中.我也很想升级到 3.0 并使用新的东西,但我没有时间(现在)重新编码在 2.x 和 3.0 之间改变的东西.

You can't move from 2.x to 3.x without doing a lot of recoding. I have a bunch of big projects in 2.2 and after trying to update to 3.0, I ran into some issues so I've decided to keep them in 2.2. I'd love to upgrade to 3.0 and use the new stuff, too, but I don't have the time (right now) to recode the stuff that changed between 2.x and 3.0.

我建议更新到 2.2.2.1 和 2.2 之间不应该有任何向后兼容性问题.我只需更改我的参考即可更新到 2.2.

I do recommend updating to 2.2. There shouldn't be any backwards compatibility issues between 2.1 and 2.2. I was able to update to 2.2 by just changing out my reference.

只是好奇,您使用的是 ActiveRecord 还是 Repo 实现?

Just curious, are you using ActiveRecord or Repo implementation?

你只有两个选择:

  1. 停留在 2.1/2.2
  2. 将您的代码更新到 3.0

这篇关于在同一个项目中使用 subsonic 2.x 和 3.x的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆