Gauravg9598 Ответов: 1

Ошибка при добавлении пакета в ASP.NET MVC


Severity	Code	Description	Project	File	Line	Suppression State
Error	NU1605	Detected package downgrade: Microsoft.EntityFrameworkCore.SqlServer from 3.1.7 to 3.1.6. Reference the package directly from the project to select a different version. 
 BulkyBook -> BulkyBook.DataAccess -> Microsoft.EntityFrameworkCore.SqlServer (>= 3.1.7) 
 BulkyBook -> Microsoft.EntityFrameworkCore.SqlServer (>= 3.1.6)	BulkyBook	E:\Visual Studio 2019\Udemy MVC\BulkyBook\BulkyBook\BulkyBook.csproj	1	


Что я уже пробовал:

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

  <PropertyGroup>
    <TargetFramework>netcoreapp3.1</TargetFramework>
    <UserSecretsId>aspnet-BulkyBook-405C349D-ECD4-4ED6-8F49-1B4B27BD37D8</UserSecretsId>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="3.1.6" />
    <PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="3.1.6" />
    <PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="3.1.6" />
    <PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="3.1.7" />
    <PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="3.1.6" />
    <PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="3.1.6" />
  </ItemGroup>

  <ItemGroup>
    <ProjectReference Include="..\BulkyBook.DataAccess\BulkyBook.DataAccess.csproj" />
  </ItemGroup>

</Project>

1 Ответов

Рейтинг:
1

Richard Deeming

Ваш BulkyBook.DataAccess проект требует Microsoft.EntityFrameworkCore.SqlServer v3.1.7 или более поздняя версия. Вы не можете ссылаться на v3.1.6 в своем BulkyBook проект.