I am trying to install Microsoft.EntityFrameworkCore
in my ASP.NET Core Web API project. But I get an error when I try to install:
Error Package restore failed. Rolling back package changes for 'RabbitMQ'.
Error NU1107 Version conflict detected for Microsoft.EntityFrameworkCore.Abstractions. Install/reference Microsoft.EntityFrameworkCore.Abstractions 3.1.0 directly to project RabbitMQ to resolve this issue. RabbitMQ -> Microsoft.EntityFrameworkCore 3.1.0 -> Microsoft.EntityFrameworkCore.Abstractions (>= 3.1.0) RabbitMQ -> Microsoft.AspNetCore.App 2.1.1 -> Microsoft.EntityFrameworkCore.Abstractions (>= 2.1.1 && < 2.2.0). RabbitMQ P:\\Users\\vivek.nuna\\RabbitMQ\\RabbitMQ\\RabbitMQ\\RabbitMQ.csproj 1
I have tried restarting VS, but it does not help.
VS 2017 version 15.8.6
CS Proj file.
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Folder Include="wwwroot\" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="RabbitMQ.Client" Version="5.1.2" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="4.0.1" />
</ItemGroup>
</Project>
Although I am able to install it in .Net Core console application the same machine.
您应该安装 Microsoft.EntityFrameworkCore 2.1.11 版本
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.