如何从Visual Studio(NuGet)卸载MySql.Data版本6.8.0-alpha?

时间:2013-12-04 13:40:23

标签: .net visual-studio-2012

我正在使用带有MySQL数据库的Entity Framework。

尝试对数据库进行查询时,出现以下错误:

Model2.ssdl(2,96) : error 0004: Could not load file or assembly 'MySql.Data.Entity, Version=6.8.0.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

我想回到之前的版本,这似乎有用。

尝试在NuGet包管理器控制台中卸载MySql.Data时,出现以下错误:

PM> Uninstall-Package MySql.Data -Version 6.8.0-alpha
Uninstall-Package : Unable to uninstall 'MySql.Data 6.8.0-alpha' because 'MySQL.Data.Entities 6.7.4.1' depends on it.
At line:1 char:1
+ Uninstall-Package MySql.Data -Version 6.8.0-alpha
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Uninstall-Package], InvalidOperationException
    + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.UninstallPackageCommand

1 个答案:

答案 0 :(得分:0)

您可以对-Force命令使用Uninstall-Package参数。

Uninstall-Package MySql.Data -Force

然后你可以安装最新的稳定版本:

Install-Package Mysql.Data