Problem Restore EF Core 2.1.1 in VSTS, Hosted VS2017 I have a project with Asp.Net Core 2.1.1, so I have to force the runtime to 2.1.1, when I added the EF Core 2.1.1 packages (SqlServer, Design and Tools). Locally the project performs well, however in the process of Build in VSTS using the Hosted VS2017 the build process fails, it does not restore the packages by dependency conflict. I installed the packages he asks for:

Microsoft.EntityFrameworkCore After New Failure
Microsoft.EntityFrameworkCore.Abstractions and then
Microsoft.EntityFrameworkCore.Analyzers ...

This is the way? Go running and failing build a build until you discover all the packages that need to be placed as dependencies? Anyone have any tips to solve this another way?

My build process is like the .net core of VSTS.

This is my .csproj file

&lt;Project Sdk="Microsoft.NET.Sdk.Web"&gt;
  &lt;PropertyGroup&gt;
    &lt;TargetFramework&gt;netcoreapp2.1&lt;/TargetFramework&gt;
    &lt;AutoGenerateBindingRedirects&gt;true&lt;/AutoGenerateBindingRedirects&gt;
    &lt;RuntimeFrameworkVersion&gt;2.1.1&lt;/RuntimeFrameworkVersion&gt;
  &lt;/PropertyGroup&gt;
  &lt;ItemGroup&gt;
    &lt;PackageReference Include="Microsoft.AspNetCore.App" /&gt;
    &lt;PackageReference Include="Microsoft.EntityFrameworkCore" Version="2.1.1" /&gt;
    &lt;PackageReference Include="Microsoft.EntityFrameworkCore.Abstractions" Version="2.1.1" /&gt;
    &lt;PackageReference Include="Microsoft.EntityFrameworkCore.Analyzers" Version="2.1.1" /&gt;
    &lt;PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="2.1.1" /&gt;
    &lt;PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="2.1.1" /&gt;
    &lt;PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="2.1.1" /&gt;
    &lt;PackageReference Include="Microsoft.EntityFrameworkCore.Tools.DotNet" Version="2.0.3" /&gt;
  &lt;/ItemGroup&gt;
&lt;/Project&gt;
I also could not restore packages after upgrading to 2.1.1. I got multiple errors similar to this:

Detected package version outside of dependency constraint: Microsoft.AspNetCore.App 2.1.0 requires Microsoft.EntityFrameworkCore (= 2.1.0) but version Microsoft.EntityFrameworkCore 2.1.1 was resolved.


I solved my problem by explicitly specifying version 2.1.301 in the build definition.