如何更新 dot net core 中的子 nuget 包

How to update the child nuget package in dot net core

在使用 NetSparker 工具对 Web 应用程序进行渗透测试期间。 4.3.0版本System.Text.RegularExpressions存在安全漏洞。 解决办法是更新nuget包到4.3.1版本。

项目间接依赖于System.Text.RegularExpressions包。该项目正在使用2.1.0版本的Microsoft.Data.SqlClient。即使我将其升级到 2.1.3,该包也不会将其子包 System.Text.RegularExpressions 升级到 4.3.1。默认情况下 System.Text.RegularExpressions 对于 Microsoft.Data.SqlClient[ 可接受的 nuget 包版本=30=] 是 >=4.3.0.

需要有关如何仅升级子 nuget 包的帮助 System.Text.RegularExpressions 到版本 4.3.1

因为我在子项目中引用了太多。我在父项目中做了直接引用,System.Text.RegularExpressions&Microsoft.Data.SqlClient指向安全版本的nuget包。

之后,所有引用 System.Text.RegularExpressions 和 Microsoft.Data.SqlClient 不安全版本的子项目开始采用父项目中提到的版本。