Team Build 在尝试编译 Structuremap 方法时发送错误
尝试编译在 Team Build 上使用 StructureMap 的解决方案时遇到奇怪的错误。
当我尝试在 Visual Studio 上本地编译解决方案时,它工作正常,但当尝试在 Team Build 中对新构建进行排队时,出现以下错误:
重载解析失败,因为无法使用这些参数调用可访问的“Use”:
出现此错误的代码行是第二行:
ForSingletonOf(Of ISessionFactory)().Use(NHibernateSessionFactory.SessionFactory)
Me.For(Of ISession)().lifecycleIs(New HybridLifecycle()).Use(Function(x) x.GetInstance(Of ISessionFactory)().OpenSession())
这是 NHibernate 会话的标准注册,所以我真的不明白为什么会弹出此错误。
预先感谢您的线索。
I'm getting a strange error when trying to compile a solution that is using StructureMap on Team Build.
When I try to compile the solution locally on Visual Studio it works fine, but when trying to queue a new build in Team Build I get the following error:
Overload resolution failed because no accessible 'Use' can be called with these arguments:
The line of code that gets this error is the second one:
ForSingletonOf(Of ISessionFactory)().Use(NHibernateSessionFactory.SessionFactory)
Me.For(Of ISession)().lifecycleIs(New HybridLifecycle()).Use(Function(x) x.GetInstance(Of ISessionFactory)().OpenSession())
It's a standard registration for the NHibernate session, so I don't really get why this error pops up.
Thanks in advance for the clues.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
确保构建服务器上有正确版本的 NHibernate,并且项目文件中的提示路径均已正确设置。我们还没有遇到这个具体问题(因为我们没有使用 NHibernate),但我们遇到了一些奇怪的问题,比如与本地和构建之间“基础设施”DLL 的版本不匹配有关。
Make sure you have the correct version of NHibernate on the build server, and that your hint paths are all appropriately set in your project file. We haven't had this specific issue (as we're not using NHibernate), but we've had weird issues like that being related to version mismatches of "infrastructure" DLLs between local and build.