Search Unity

Question Intellij Rider MSB3277 error

Discussion in 'Code Editors & IDEs' started by dsfgddsfgdsgd, Oct 30, 2022.

  1. dsfgddsfgdsgd

    dsfgddsfgdsgd

    Joined:
    Jan 24, 2014
    Posts:
    16
    I'm getting a warning every time I build a project in IntelliJ Rider. Even when I create a completely new project I get the same warning:

    C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2302,5): Warning MSB3277 : Found conflicts between different versions of "System.Net.Http" that could not be resolved.
    There was a conflict between "System.Net.Http, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" and "System.Net.Http, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
    "System.Net.Http, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" was chosen because it was primary and "System.Net.Http, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" was not.
    References which depend on "System.Net.Http, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" [C:\Program Files\Unity\Hub\Editor\2022.2.0b10\Editor\Data\NetStandard\compat\2.1.0\shims\netstandard\System.Net.Http.dll].
    C:\Program Files\Unity\Hub\Editor\2022.2.0b10\Editor\Data\NetStandard\compat\2.1.0\shims\netstandard\System.Net.Http.dll
    Project file item includes which caused reference "C:\Program Files\Unity\Hub\Editor\2022.2.0b10\Editor\Data\NetStandard\compat\2.1.0\shims\netstandard\System.Net.Http.dll".
    System.Net.Http
    References which depend on "System.Net.Http, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" [].
    I believe it's because I have multiple named DLLs of System.Net.Http. Microsoft seems to have some documentation on this:
    https://learn.microsoft.com/en-us/visualstudio/msbuild/errors/msb3277?view=vs-2022

    I've tried to fix this problem by:
    • Updating NuGet packages through Rider
    • Updating App.config
    Neither of these has worked, and App.config is being overwritten

    I'm also getting another warning but I don't think they are related:

    com.unity.testtools.codecoverage@1.2.0\lib\ReportGenerator\ReportGeneratorMerged.dll
    Project file item includes which caused reference "com.unity.testtools.codecoverage@1.2.0\lib\ReportGenerator\ReportGeneratorMerged.dll".
    ReportGeneratorMerged
    Unity.TestTools.CodeCoverage.Editor​
     
  2. van800

    van800

    JetBrains Employee

    Joined:
    May 19, 2016
    Posts:
    73
    Unity doesn't expect anyone to build your generated solution outside Unity.