Nuget cannot find newer dependency

拜拜、爱过 提交于 2019-12-01 17:06:06

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

Original Answer:

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.

You can't have two different versions in the same project. You can use a * to allow up- or downgrade. See this artical Dependency-Resolution

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!