Skip to content

Problem with dotnet cli ef tools after upgrading to vs 2017 15.4.4 and november .net core rollup  #10298

@spnm

Description

@spnm

Not sure if its an EFCore issue or cli

Steps to reproduce

Using Visual Studio Enterprise 2017 (v 15.4.4)

Add migration

dotnet ef migrations add [MigrationName]

Expected behavior

Migration created

Actual behavior

Error message :
The specified framework version '2.0' could not be parsed
The specified framework 'Microsoft.NETCore.App', version '2.0' was not found.
Check application dependencies and target a framework version installed at:
\
Alternatively, install the framework version '2.0'.

My project is a console library and the content of .csproj file is below:

<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <TargetFramework>netcoreapp2.0</TargetFramework>
  </PropertyGroup>
  
  <ItemGroup>
    <PackageReference Include="System.Reflection.Metadata" Version="1.5.0" />
    <PackageReference Include="Microsoft.Extensions.Configuration" Version="2.0.0" />
    <PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="2.0.1" />
    <PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="2.0.1" PrivateAssets="All" />
  </ItemGroup>
  
  <ItemGroup>
    <DotNetCliToolReference Include="Microsoft.EntityFrameworkCore.Tools.DotNet" Version="2.0.1" />
  </ItemGroup>
</Project>

So i tried to use global.json in the root of my project :

{
  "sdk": {
    "version": "2.0.3"
  }
}

and the error was the same.
But when I changed global.json content to this :

{
  "sdk": {
    "version": "2.0.2"
  }
}

It worked.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions