[英]Failing to correctly reference currently installed version of .NET Core
I created the project when I had RC2 installed. 我在安装RC2时创建了项目。 Then when .NET Core 1.0.0 was released, I uninstalled rc2 and installed 1.0.0. 然后,当.NET Core 1.0.0发布时,我卸载了rc2并安装了1.0.0。 The app is not able to connect to the database now. 该应用程序现在无法连接到数据库。 Also the 'Update-Database' command in the Package Manager Console is not executing correctly. 另外,程序包管理器控制台中的“更新数据库”命令未正确执行。 I changed all the dependencies in the project.lock.json from '1.0.0-rc2-3002702' to '1.0.0' but the same error occurs. 我将project.lock.json中的所有依赖项从“ 1.0.0-rc2-3002702”更改为“ 1.0.0”,但发生了相同的错误。
The error in the Package Manager Console: 程序包管理器控制台中的错误:
Receiving an error in PMC: The specified framework 'Microsoft.NETCore.App', version '1.0.0-rc2-3002702' was not found. 接收PMC中的错误:找不到指定的框架'Microsoft.NETCore.App'版本'1.0.0-rc2-3002702'。 - Check application dependencies and target a framework version installed at: C:\\Program Files\\dotnet\\shared\\Microsoft.NETCore.App -检查应用程序依存关系并确定安装在以下位置的框架版本:C:\\ Program Files \\ dotnet \\ shared \\ Microsoft.NETCore.App
The following versions are installed: 1.0.0 Alternatively, install the framework version '1.0.0-rc2-3002702'. 安装了以下版本:1.0.0或者,安装框架版本“ 1.0.0-rc2-3002702”。
I am wondering where else a reference to that version of .NET Core might be stated? 我想知道还有什么地方可以提及该版本的.NET Core?
This is my project.json - http://pastebin.com/wC91swU7 这是我的project.json- http://pastebin.com/wC91swU7
I changed all the dependencies in the project.lock.json 我更改了project.lock.json中的所有依赖项
You have edited wrong file. 您编辑了错误的文件。 You should update dependencies versions in project.json file and then run package restore command - this will regenerate project.lock.json. 您应该在project.json文件中更新依赖项版本,然后运行包还原命令-这将重新生成project.lock.json。
Recheck your dependency list. 重新检查您的依赖项列表。 At least I see the following problems 至少我看到以下问题
The solution I found was installing: 我发现的解决方案是安装:
PM> Install-Package Microsoft.EntityFrameworkCore.Tools -Pre PM>安装包Microsoft.EntityFrameworkCore.Tools -Pre
and replace preview1 with preview2 in 并在其中将Preview1替换为Preview2
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.