<p>I also could not restore packages after upgrading to 2.1.1. I got multiple errors similar to this:</p>

<pre><code>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.
</code></pre>

<p>I solved my problem by explicitly <a href="https://cmatskas.com/working-with-the-latest-net-core-version-in-vsts/" rel="nofollow noreferrer">specifying version 2.1.301</a> in the build definition.</p>

CC BY-SA 4.0
2018-06-28T13:29:15.977Z
I’ll try and answer you, thanks for the tip.
Roberto Leite de Moraes
CC BY-SA 4.0
2018-06-28T13:59:43.443Z
It works!!! nice
Roberto Leite de Moraes
CC BY-SA 4.0
2018-06-28T13:22:28.067Z
2018-06-28T13:22:28.067Z
Balder L
<p>I have a project with <code>Asp.Net Core 2.1.1</code>, so I have to force the runtime to 2.1.1, when I added the <code>EF Core 2.1.1</code> packages (<code>SqlServer, Design and Tools</code>). Locally the project performs well, however in the process of Build in <code>VSTS</code> using the <code>Hosted VS2017</code> the build process fails, it does not restore the packages by dependency conflict. I installed the packages he asks for:</p>

<p><code>Microsoft.EntityFrameworkCore</code> After New Failure
<code>Microsoft.EntityFrameworkCore.Abstractions</code> and then
<code>Microsoft.EntityFrameworkCore.Analyzers</code> ...</p>

<p>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?</p>

<p>My build process is like the .net core of VSTS.</p>

<p>This is my .csproj file</p>

<pre><code>&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;
</code></pre>

<azure-devops><azure-pipelines><nuget>
Problem Restore EF Core 2.1.1 in VSTS, Hosted VS2017
Roberto Leite de Moraes
# Problem Restore EF Core 2.1.1 in VSTS, Hosted VS2017

(Asked by: username_0 on 2018-06-27)

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

  
    netcoreapp2.1
    true
    2.1.1

**Tags:** azure-devops, azure-pipelines, nuget


---

## 1 answers

### Answer by username_1 on 2018-06-28. Score: 0 | Accepted answer

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.

> **Comments:**
> **username_0**: I’ll try and answer you, thanks for the tip.  
> **username_0**: It works!!! nice  

---

