Nuget cannot find newer dependency

前端 未结 2 1521
轻奢々
轻奢々 2021-01-18 09:24

I\'ve just created a new project in ASP 5 MVC 6 beta8 and a compatible class library for tests. The problem occurs in this new \"Web Class Library\" project that I intended

相关标签:
2条回答
  • 2021-01-18 10:03

    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

    0 讨论(0)
  • 2021-01-18 10:05

    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.

    0 讨论(0)
提交回复
热议问题