0
votes

The error message is:

warning MSB3277: Found conflicts between different versions of the same dependent assembly that could not be resolved. These reference conflicts are listed in the build log when log verbosity is set to detailed.

This has to be one of the most irritating error messages since for some reason they decided (there is a thread about this) to not change how this error is handled, forcing users to go hunt for the problem.

I get many like this:

Encountered conflict between 'Reference:C:\Program Files\dotnet\sdk\NuGetFallbackFolder\system.appcontext\4.3.0\ref\net463\System.AppContext.dll' and 'Reference:C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\ref\System.AppContext.dll'. Choosing 'Reference:C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\ref\System.AppContext.dll' because AssemblyVersion '4.1.2.0' is greater than '4.1.1.0'.

First, the error with old assemblies that were in users/administrator/.nuget/packages. I removed that folder.

Now it goes to find old assemblies in \program files\dotnet\sdk\NuGetFallbackFolder

The whole project is using .NET 4.7

Has anyone see that problem?

2

2 Answers

0
votes

I found that the solution option "restore Nuget packages" didn't work very well.

To cut a long story short, I had to run the NuGet command Update-Package -reinstall and then consolodate the different versions across the solution.

I had some problems obtaining detailed debug from the output due to Resharper build, which I had to disable too. I wrote a more detailed article about it here .

0
votes

Try to identify any hardcoded assembly references in your (app/web).config files. Remove those and use dotnet/nuget to restore your packages using a single packages.config file.