我有一个使用EF 4.0的旧Web项目。尝试升级到新版本。
我清除了packages
文件夹。我删除了packages.config
文件。
然后我打开了包管理器控制台,键入install-package -id EntityFramework
并按下回车。
PM> install-package -id EntityFramework
Installing 'EntityFramework 6.1.2'.
You are downloading EntityFramework from Microsoft, the license agreement to which is available at http://go.microsoft.com/fwlink/?LinkID=320539. Check the package for additional dependencies, which may come with their own license agreement(s). Your use of the package and dependencies constitutes your acceptance of their license agreements. If you do not accept the license agreement(s), then delete the relevant components from your device.
Successfully installed 'EntityFramework 6.1.2'.
Adding 'EntityFramework 6.1.2' to ProjectName.
Install failed. Rolling back...
install-package : Input string was not in a correct format.
At line:1 char:1
+ install-package -id EntityFramework
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Install-Package], FormatException
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand
尝试卸载:
PM> uninstall-package EntityFramework
Removing 'EntityFramework 6.1.2' from ProjectName.
uninstall-package : Input string was not in a correct format.
At line:1 char:1
+ uninstall-package EntityFramework
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Uninstall-Package], FormatException
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.UninstallPackageCommand
尝试再安装一次:
PM> install-package EntityFramework
'EntityFramework 6.1.2' already installed.
ProjectName already has a reference to 'EntityFramework 6.1.2'.
然后尝试添加新模型,不能选择EF 6.0
如何开始使用EF 6.0?