question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Failing to correctly reference currently installed version of .NET Core

See original GitHub issue

I 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

  1. Created the project on RC2
  2. Build it and worked on it
  3. Uninstalled RC2 and installed .NET Core 1.0.0 Runtime
  4. Unable to execute successfully ‘Update-Database’ in the package manager console and unable to connect to the db
  5. Changing the Microsoft.NETCore.App dependencies in project.lock.json file
  6. 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:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
supadrastacommented, Jul 25, 2016

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.

1reaction
cmdkeencommented, Jul 8, 2016

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Failing to correctly reference currently installed version of . ...
I created the project when I had RC2 installed. Then when .NET Core 1.0.0 was released, I uninstalled rc2 and installed 1.0.0. The...
Read more >
Troubleshoot .NET tool usage issues
A common reason for failure is that the tool name isn't correct. This can happen because of mistyping, or because the tool has...
Read more >
NETSDK1045: The current .NET SDK does not support ...
This error occurs when the build tools can't find the version of the .NET SDK that's needed to build a project. This is...
Read more >
Visual Studio 2019 unable to locate .Net Core SDK
Step 1) First run dotnet --list-sdks from the command line (as in Grzegorz Smulko's answer). Take note of the greatest version number.
Read more >
Unable to locate the .NET SDK: The Reasons - Hamid Mosalla
Navigate to C:\Program Files\dotnet\sdk and see if you can find folders associated with different sdk versions. If you can't find any folder ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found