I'm getting build errors about 'package downgrade', eg:
NU1605 Detected package downgrade: Microsoft.Extensions.Configuration.Json from 1.1.2 to 1.0.2. Reference the package directly from the project to select a different version.
Proj -> MySql.Data.EntityFrameworkCore.Design 6.10.5 -> MySql.Data 6.10.5 -> Microsoft.Extensions.Configuration.Json (>= 1.1.2)
Proj -> Microsoft.Extensions.Configuration.Json (>= 1.0.2) Proj C:\path\Proj .csproj 1
So to try and resolve it I will try to update-package Microsoft.Extensions.Configuration.Json to -version 1.1.2. But that will fail telling me to upgrade some other package for same reason as above.
So, the problem is
PROJ -> A -> B (ver 2)
and
PROJ -> B (ver 1)
But I can't update B in PROJ to ver 2 because another similar problem also exists (this is reported when I run update-package B -version 2.0
)
PROJ -> C -> D (ver 2)
and
PROJ -> D (ver 1)
Is the only way to resolve all this to tinker with the .csproj file directly?
I ended up opening the .csproj in a text editor and modifying the version numbers there, eg.
<PackageReference Include="Microsoft.AspNetCore.Authentication.Cookies" Version="1.0.2" />
<PackageReference Include="Microsoft.AspNetCore.Diagnostics" Version="1.0.2" />
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="1.0.2" />
then save, wait for VS to recognize the change, rebuild solution.
It took a few iterations to fix all package versions necessary.
In case it isn't clear, I modified the version to the higher version number reported in the build error.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With