dotnet restore keeps using local project instead of nuget package

后端 未结 2 1437
忘了有多久
忘了有多久 2021-02-11 02:05

I have a .NET-core project in Visual Studio 2015. In it, I used a Nuget package, but after finding a bug in the package, I checked out its source code and included the library p

2条回答
  •  爱一瞬间的悲伤
    2021-02-11 02:46

    Note: This answer has been copied from here

    Local projects take precedence over NuGet packages. I don't know at what level this is baked-in, though.

    The solution is to explicitly specify in your project.json that you want to reference a NuGet package and not the project in the same solution.

    "YourNuGetPackageName": {
        "type": "package",
        "version": "VersionOfYourNuGetPackage"
    }
    

    You can have a look at an example here.

提交回复
热议问题