Quantcast
Channel: Recent Questions - Stack Overflow
Viewing all articles
Browse latest Browse all 12141

Why .NET crashes on wrong nuget version

$
0
0

My setup is the following

Project Database

<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.5" /><PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.5"><PrivateAssets>all</PrivateAssets><IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets></PackageReference><PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="8.0.4" /><PackageReference Include="Npgsql" Version="8.0.3" /><PackageReference Include="EFCore.NamingConventions" Version="8.0.3" />

Main project references the Database project

When I build, I end up with Microsoft.EntityFrameworkCore.Relational 8.0.4

The thing is that the app crashes in Visual with the error Could not load file or assembly 'Microsoft.EntityFrameworkCore.Relational, Version=8.0.5

I understand the nuget resolution

  • Npgsql.EntityFrameworkCore.PostgreSQL needs EF Core & Relational >= 8.0.4
  • I then force Core to 8.0.5 so it keeps Relational to 8.0.4

I also understand that it is a mistake to force only one of the dependencies and I should specify both to 8.0.5 (which I did after)

What I do not understand is why the runtime crashes with an error saying it needs relational 8.0.5 ? Why is it not trying to use 8.0.4 ?


Viewing all articles
Browse latest Browse all 12141

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>