sdk: Fresh Mac Install: "The specified framework 'Microsoft.NETCore.App', version '1.0.0' was not found."

Steps to reproduce

I’m a first-timer; just installed dotnet-dev-osx-x64.1.0.0-preview2-1-003177.pkg

The hello world sequence worked fine - I ran into problems setting up a webapp via https://docs.microsoft.com/en-us/azure/app-service-web/web-sites-create-web-app-using-vscode

If i do the dotnet build or dotnet ef ... steps, I get the following output:

The specified framework ‘Microsoft.NETCore.App’, version ‘1.0.0’ was not found.

  • Check application dependencies and target a framework version installed at: /usr/local/share/dotnet/shared/Microsoft.NETCore.App
  • The following versions are installed: 1.1.0
  • Alternatively, install the framework version ‘1.0.0’.

I think the “fix” is for me to trace through project.lock.json, hunt down all the dependencies with NETCore.App 1.0.0 dependencies, and try to modify them to use a newer dependency version. Still, it’s a bit of a downer in the new user onboarding experience, so I’m reporting it here.

Expected behavior

dotnet ef and dotnet run commands work without issue

Actual behavior

The specified framework ‘Microsoft.NETCore.App’, version ‘1.0.0’ was not found.

  • Check application dependencies and target a framework version installed at: /usr/local/share/dotnet/shared/Microsoft.NETCore.App
  • The following versions are installed: 1.1.0
  • Alternatively, install the framework version ‘1.0.0’.

Environment data

dotnet --info output:

.NET Command Line Tools (1.0.0-preview2-1-003177)

Product Information: Version: 1.0.0-preview2-1-003177 Commit SHA-1 hash: a2df9c2576

Runtime Environment: OS Name: Mac OS X OS Version: 10.11 OS Platform: Darwin RID: osx.10.11-x64

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Reactions: 5
  • Comments: 20 (1 by maintainers)

Most upvoted comments

Just thought I would add. I had this same issue. I did not install .NET Core 1.01

All I did to get this working on my Mac with .NET Core 1.1. is right click on the project file in the Solution Explorer and Update Nuget Packages and I was then able to run the application

Installing .NET Core 1.0.1 SDK (package) fixed my issue - the problem seems to be the Yeoman templates (yo aspnet) are not yet ready for 1.1.0

@ebraminio - give this a try.

Make sure your global.json file looks like this:

{
  "projects": [ "src", "test" ],
  "sdk": {
    "version": "1.0.0-preview2-1-003177"
  }
}

Also, edit your project.json file by replacing “1.0.0” with “1.1.0”, replacing “1.0.1” with “1.1.0”, and also replacing “1.0.0-preview2-final” with “1.1.0-preview4-final”. After you save project.json with the new changes, update nuget package. Then go to your project directory where project.json is and run dotnet restore.

I’m not sure about the nuget update part, but I think updating your package.json file and running dotnet restore should give you 1.1.0 so you can run your project with dotnet run. Let me know if that works out for you.

The problem isn’t the Yeoman template (yo aspnet). In fact, it is ready for 1.1.0. I think the issue is that you need to update your .NET Core SDK to version 1.1 (https://www.microsoft.com/net/core#macos), which is the current version.