2016-03-23 120 views
2

我正在将nHibernate 2.2的Windows Smart Client解决方案升级到4.0。 这也需要更新Iesi.Collections(4.0.1.4000)。类型或名称空间名称“ISet”不存在

在此行中:

protected Iesi.Collections.Generic.ISet<PermitEvent> eventSet; 

我得到这个错误:

The type or namespace name 'ISet' does not exist in the namespace 'Iesi.Collections.Generic' 

这个问题已经在其他2位没有得到答复:
http://www.c-sharpcorner.com/forums/the-type-or-namespace-name-iset-could-not-be-found http://www.resolvinghere.com/cc/the-type-or-namespace-name-iset-could-not-be-found.shtml

我能做些什么?

+0

[?这是否帮助(http://stackoverflow.com/q/ 23211641/2530848) –

+0

在过去,由于这些问题,我使用IEnumerable和IList而不是Iesi.Collections中的任何东西。我知道这涉及代码更改(可能会有很多代码更改),但这可能是一种选择吗? –

回答

2

有了NHibernate 4,在大多数情况下你就是do not need anymore to explicitly depend on Iesi

您应该将实体代码迁移为使用System.Collections.Generic.ISet<T>

这就是我所做的,甚至在遇到任何与Iesi有关的问题之前。非常抱歉,如果你想留在Iesi,我无法帮助你。我甚至认为这根本不可能。

Release notes,部分 “**已知的重大更改从NH3.3.3.GA到4.0.0.GA”:

Many uses of set types from Iesi.Collections have now been changed to use corresponding types from the BCL. The API for these types are slightly different.

相关问题