admin管理员组

文章数量:1125094

I have a .NET Framework web app that has service and data layer targeting both .NET 4.7.1 and .NET Core 8.0.

The blackduck identifies a vulnerability in Microsoft.Data.SqlClient 1.1.3. Updates Microsoft.Data.SqlClient from v1.1.3 to v3.7.1 which works with both .NET 4.7.1, and .NET Core 8.0.

But some project where Microsoft.EntityFrameworkCore.SqlServer is referenced has a dependency on Microsoft.Data.SqlClient v1.1.3 which cannot be updated without updating the main library but if I update Microsoft.EntityFrameworkCore.SqlServer to latest, it won't work with .NET 4.7.1.

I tried adding Microsoft.Data.SqlClient v3.7.1 this to those project where it referred indirectly but even then project.asset.json has reference of Microsoft.Data.SqlClient v1.1.3

Please advise best way to overcome this issue.

I have a .NET Framework web app that has service and data layer targeting both .NET 4.7.1 and .NET Core 8.0.

The blackduck identifies a vulnerability in Microsoft.Data.SqlClient 1.1.3. Updates Microsoft.Data.SqlClient from v1.1.3 to v3.7.1 which works with both .NET 4.7.1, and .NET Core 8.0.

But some project where Microsoft.EntityFrameworkCore.SqlServer is referenced has a dependency on Microsoft.Data.SqlClient v1.1.3 which cannot be updated without updating the main library but if I update Microsoft.EntityFrameworkCore.SqlServer to latest, it won't work with .NET 4.7.1.

I tried adding Microsoft.Data.SqlClient v3.7.1 this to those project where it referred indirectly but even then project.asset.json has reference of Microsoft.Data.SqlClient v1.1.3

Please advise best way to overcome this issue.

Share Improve this question edited yesterday marc_s 754k183 gold badges1.4k silver badges1.5k bronze badges asked yesterday user3497702user3497702 8414 gold badges16 silver badges28 bronze badges 1
  • What version of EF Core is this? I'm guessing 3.1 as they have pretty much given up on cross-support between .Net Framework and .Net Core. Your EF Core is likely already out of support. You face possible breaking changes with major version updates and older libraries are going to run foul of this. Your only real option to continue to support the deployment to address updating vulnerable dependencies is to untangle the mess each time. If the EF dependency needs 3.1.7 and another dependency doesn't work with 3.1.7 then you need to find a version of that dependency that does... and so on. – Steve Py Commented yesterday
Add a comment  | 

1 Answer 1

Reset to default 0

Add a direct package dependency to the version of Microsoft.Data.SqlClient you need.

Then Nuget will apply the "Direct Dependency Wins" rule to load right version.

本文标签: