Found conflicts between System.Net.Http

前端 未结 9 1430
一整个雨季
一整个雨季 2020-12-08 07:12

I have several projects in my VS solution. Whenever I add \"System.Net.Http\" NuGet package to one it shows as version 4.2.0.0. Then I do the same and add same NuGet Package

9条回答
  •  天涯浪人
    2020-12-08 07:19

    You can force the version you're installing, so you can have both projects aligned or find a message in the output window, which would be telling you what's wrong or what your dependencies are. Since the official link lists no 4.2 release, I would do this (solution-wide)

    Install-Package System.Net.Http -Version 4.1.1
    

    Or for both projects

    Get-Project ProjectName | Install-Package System.Net.Http -Version 4.1.1
    

    Or, even better (using the last version)

    Install-Package System.Net.Http -Version 4.3.3
    

    EDIT

    Apparently you are not the first to experience this. How about the answer here? Basically you can align this section of both projects config file:

      
        
          
            
            
          
        
      
    

    You might have to adapt the token value. Just in case, could you paste the config file for both projects=

提交回复
热议问题