且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Nuget 找不到更新的依赖项

更新时间:2023-09-20 12:58:10

更新:现在可以通过升级到 AutoFixture.AutoMoq 3.41.0 或更高版本来解决此问题.

Update: This can now be fixed by upgrading to AutoFixture.AutoMoq 3.41.0 or later.

原答案:

在 project.lock.json 的目标部分中,将moq"大写,以便 AutoMoq 元素如下所示:

In the targets section of project.lock.json capitalize "moq", so that the AutoMoq element looks like this:

"AutoFixture.AutoMoq/3.38.0": {
    "type": "package",
    "dependencies": {
      "autofixture": "3.38.0",
      "Moq": "4.1.1308.2120"
    },

不幸的是,每次重新生成锁定文件时,您都必须再次执行此操作.

Unfortunately, you will have to do this again every time the lock file is regenerated.