Using VS 2019, several of my projects are generating this build warning when compiling:
5>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2081,5): warning MSB3277: Found conflicts between different versions of "Microsoft.EntityFrameworkCore" that could not be resolved. These reference conflicts are listed in the build log when log verbosity is set to detailed.
As the log is not really... verbose (even in detailed mode), I investigated a bit and it seems the error is provoked by Pomelo.EntityFrameworkCore.Mysql/3.1.2 (we are using MariaDB). Here is an extract of a project json, with a dependency on EF 3.1.0 while the current version is 3.1.6:
"Pomelo.EntityFrameworkCore.MySql/3.1.2": {
"type": "package",
"dependencies": {
"Microsoft.EntityFrameworkCore.Relational": "3.1.0",
"MySqlConnector": "[0.61.0, 1.0.0)",
"Pomelo.JsonObject": "2.2.1"
},
Here is an example of PackageReference include sections of a test project for which the warning is happening:
<ItemGroup>
<PackageReference Include="FluentAssertions" Version="5.10.3" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.6.1" />
<PackageReference Include="NSubstitute" Version="4.2.2" />
<PackageReference Include="XmlUnit.Core" Version="2.8.0" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="1.3.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
What should I do:
- ignore this warning (and wait a pomelo update of the dependency)
- downgrade to EF 3.1.0
- any other idea?
BR