流利的NuGet搞砸了

时间:2012-03-05 18:19:09

标签: nhibernate fluent-nhibernate nuget nuget-package

我有几个项目的解决方案。我将Fluent nHibernate的几个引用更改为NuGet包(v1.3.0.717)。最近我改变了另一个项目,并添加了当前的Fluent软件包,1.2.0.712(早期但当前),我的应用程序将构建但不运行。当前版本指向nHibernate v3.1.0.4,但在某处它与v3.2.9.4000冲突,后者是Fluent的先前版本引用的。

Inner Exception
{"Could not load file or assembly 'NHibernate, Version=3.1.0.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4' or one of its dependencies. 
The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)":"
NHibernate, Version=3.1.0.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4"}

Exception
Could not load file or assembly 'NHibernate, Version=3.2.0.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4' or one of its dependencies. 
The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

如何清理此项目并让它再次运行?

1 个答案:

答案 0 :(得分:5)

删除所有NHibernate / Fluent Nhibernate相关软件包并运行命令

Install-Package FluentNHibernate -Version 1.3.0.717

它将为您安装correct package

由于某种原因,此包未标记为当前版本。这就是为什么Nuget会给你一个旧的。