Failing to correctly reference currently installed version of .NET Core
See original GitHub issueI created a project in RC2 then when .NET Core 1.0.0 was released, I uninstalled rc2 and installed 1.0.0. The app is not able to connect to the database. 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.
I am wondering where else a reference to that version of .NET Core might be stated?
Steps to reproduce
- Created the project on RC2
- Build it and worked on it
- Uninstalled RC2 and installed .NET Core 1.0.0 Runtime
- Unable to execute successfully ‘Update-Database’ in the package manager console and unable to connect to the db
- Changing the Microsoft.NETCore.App dependencies in project.lock.json file
- Same problem
Expected behavior
Update the database according to the change in the models.
Actual behavior
Receiving an error in PMC: The specified framework ‘Microsoft.NETCore.App’, version ‘1.0.0-rc2-3002702’ was not found. - Check application dependencies and target a framework version installed at: 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’.
Environment data
dotnet --info
output:
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:7 (1 by maintainers)
Top GitHub Comments
I also ran into this issue. I cross checked project.json to ensure all references were pointing to 1.0.0. My project.json had these entries
“Microsoft.EntityFrameworkCore”: “1.0.0”, “Microsoft.EntityFrameworkCore.SqlServer”: “1.0.0”, “Microsoft.EntityFrameworkCore.Tools”: “1.0.0-preview2-final”
The code that generates project.lock.json appears flaky. The project.lock.json file generated continued to point to 1.0.0-rc2-3002702 references. I resolved this by moving the meat of my web site including the models into a new project and had the project.json created afresh.
I had this issue as well, specifically with “dotnet watch run” that I wasn’t getting with “dotnet run”. The issue was that I was using “1.0.0-*” in my project.json and had installed the tool previously (for a different project) using RC2. Changing to “1.0.0-preview2-final” fixed it.