ResolvePackageFileConflicts is emitting confusing conflict messages when building .NET 3.5 projects.
See original GitHub issueSteps to Reproduce
- Setup environment with msbuild 15.5 or newer
- Create a new .NET 3.5 project
- Build - msbuild /t:build
Actual Results The build output indicates there are a bunch of package conflicts
...
Using "ResolvePackageFileConflicts" task from assembly "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\\tools\net46\Microsoft.NET.Build.Extensions.Tasks.dll".
Task "ResolvePackageFileConflicts"
Encountered conflict between 'Platform:System.DirectoryServices.AccountManagement.dll' and 'Platform:System.DirectoryServices.AccountManagement.dll'. Could not determine winner due to equal file and assembly versions.
Encountered conflict between 'Platform:System.Net.dll' and 'Platform:System.Net.dll'. Could not determine winner due to equal file and assembly versions.
Encountered conflict between 'Platform:System.ComponentModel.DataAnnotations.dll' and 'Platform:System.ComponentModel.DataAnnotations.dll'. Could not determine winner due to equal file and assembly versions.
Encountered conflict between 'Platform:System.Web.Abstractions.dll' and 'Platform:System.Web.Abstractions.dll'. Could not determine winner due to equal file and assembly versions.
Encountered conflict between 'Platform:System.Web.Routing.dll' and 'Platform:System.Web.Routing.dll'. Could not determine winner due to equal file and assembly versions.
Encountered conflict between 'Platform:System.Web.DynamicData.dll' and 'Platform:System.Web.DynamicData.dll'. Could not determine winner due to equal file and assembly versions.
Encountered conflict between 'Platform:System.Web.DynamicData.Design.dll' and 'Platform:System.Web.DynamicData.Design.dll'. Could not determine winner due to equal file and assembly versions.
Encountered conflict between 'Platform:System.Web.Extensions.Design.dll' and 'Platform:System.Web.Extensions.Design.dll'. Could not determine winner due to equal file and assembly versions.
Encountered conflict between 'Platform:System.Web.Extensions.dll' and 'Platform:System.Web.Extensions.dll'. Could not determine winner due to equal file and assembly versions.
Encountered conflict between 'Platform:System.Core.dll' and 'Platform:System.Core.dll'. Could not determine winner due to equal file and assembly versions.
Encountered conflict between 'Platform:Microsoft.Build.Conversion.v3.5.dll' and 'Platform:Microsoft.Build.Conversion.v3.5.dll'. Could not determine winner due to equal file and assembly versions.
Encountered conflict between 'Platform:Microsoft.Build.Utilities.v3.5.dll' and 'Platform:Microsoft.Build.Utilities.v3.5.dll'. Could not determine winner due to equal file and assembly versions.
Encountered conflict between 'Platform:Microsoft.Build.Tasks.v3.5.dll' and 'Platform:Microsoft.Build.Tasks.v3.5.dll'. Could not determine winner due to equal file and assembly versions.
Encountered conflict between 'Platform:Microsoft.Build.Engine.dll' and 'Platform:Microsoft.Build.Engine.dll'. Could not determine winner due to equal file and assembly versions.
Encountered conflict between 'Platform:Microsoft.Build.Framework.dll' and 'Platform:Microsoft.Build.Framework.dll'. Could not determine winner due to equal file and assembly versions.
Encountered conflict between 'Platform:System.Data.DataSetExtensions.dll' and 'Platform:System.Data.DataSetExtensions.dll'. Could not determine winner due to equal file and assembly versions.
Encountered conflict between 'Platform:System.AddIn.dll' and 'Platform:System.AddIn.dll'. Could not determine winner due to equal file and assembly versions.
Encountered conflict between 'Platform:System.AddIn.Contract.dll' and 'Platform:System.AddIn.Contract.dll'. Could not determine winner due to equal file and assembly versions.
Encountered conflict between 'Platform:System.Data.Linq.dll' and 'Platform:System.Data.Linq.dll'. Could not determine winner due to equal file and assembly versions.
Encountered conflict between 'Platform:System.Xml.Linq.dll' and 'Platform:System.Xml.Linq.dll'. Could not determine winner due to equal file and assembly versions.
Encountered conflict between 'Platform:System.Management.Instrumentation.dll' and 'Platform:System.Management.Instrumentation.dll'. Could not determine winner due to equal file and assembly versions.
Encountered conflict between 'Platform:System.ServiceModel.Web.dll' and 'Platform:System.ServiceModel.Web.dll'. Could not determine winner due to equal file and assembly versions.
Encountered conflict between 'Platform:System.WorkflowServices.dll' and 'Platform:System.WorkflowServices.dll'. Could not determine winner due to equal file and assembly versions.
Encountered conflict between 'Platform:Microsoft.VisualC.STLCLR.dll' and 'Platform:Microsoft.VisualC.STLCLR.dll'. Could not determine winner due to equal file and assembly versions.
Encountered conflict between 'Platform:Microsoft.VisualC.STLCLR.dll' and 'Platform:Microsoft.VisualC.STLCLR.dll'. Could not determine winner due to equal file and assembly versions.
Encountered conflict between 'Platform:System.Windows.Presentation.dll' and 'Platform:System.Windows.Presentation.dll'. Could not determine winner due to equal file and assembly versions.
Encountered conflict between 'Platform:Sentinel.v3.5Client.dll' and 'Platform:Sentinel.v3.5Client.dll'. Could not determine winner due to equal file and assembly versions.
Encountered conflict between 'Platform:System.Data.Entity.dll' and 'Platform:System.Data.Entity.dll'. Could not determine winner due to equal file and assembly versions.
Encountered conflict between 'Platform:System.Data.Entity.Design.dll' and 'Platform:System.Data.Entity.Design.dll'. Could not determine winner due to equal file and assembly versions.
Encountered conflict between 'Platform:System.Web.Entity.dll' and 'Platform:System.Web.Entity.dll'. Could not determine winner due to equal file and assembly versions.
Encountered conflict between 'Platform:System.Web.Entity.Design.dll' and 'Platform:System.Web.Entity.Design.dll'. Could not determine winner due to equal file and assembly versions.
Encountered conflict between 'Platform:System.Data.Services.dll' and 'Platform:System.Data.Services.dll'. Could not determine winner due to equal file and assembly versions.
Encountered conflict between 'Platform:System.Data.Services.Client.dll' and 'Platform:System.Data.Services.Client.dll'. Could not determine winner due to equal file and assembly versions.
Encountered conflict between 'Platform:System.Data.Services.Design.dll' and 'Platform:System.Data.Services.Design.dll'. Could not determine winner due to equal file and assembly versions.
Encountered conflict between 'Platform:Microsoft.Build.Engine.dll' and 'Platform:Microsoft.Build.Engine.dll'. Choosing 'Platform:Microsoft.Build.Engine.dll' because AssemblyVersion '3.5.0.0' is greater than '2.0.0.0'.
Encountered conflict between 'Platform:Microsoft.Build.Framework.dll' and 'Platform:Microsoft.Build.Framework.dll'. Choosing 'Platform:Microsoft.Build.Framework.dll' because AssemblyVersion '3.5.0.0' is greater than '2.0.0.0'.
Encountered conflict between 'Platform:MSBuild.dll' and 'Platform:MSBuild.dll'. Choosing 'Platform:MSBuild.dll' because AssemblyVersion '3.5.0.0' is greater than '2.0.0.0'.
Encountered conflict between 'Platform:System.DirectoryServices.AccountManagement.dll' and 'Platform:System.DirectoryServices.AccountManagement.dll'. Could not determine winner due to equal file and assembly versions.
Encountered conflict between 'Platform:System.Net.dll' and 'Platform:System.Net.dll'. Could not determine winner due to equal file and assembly versions.
Encountered conflict between 'Platform:System.ComponentModel.DataAnnotations.dll' and 'Platform:System.ComponentModel.DataAnnotations.dll'. Could not determine winner due to equal file and assembly versions.
Encountered conflict between 'Platform:System.Web.Abstractions.dll' and 'Platform:System.Web.Abstractions.dll'. Could not determine winner due to equal file and assembly versions.
Encountered conflict between 'Platform:System.Web.Routing.dll' and 'Platform:System.Web.Routing.dll'. Could not determine winner due to equal file and assembly versions.
Encountered conflict between 'Platform:System.Web.DynamicData.dll' and 'Platform:System.Web.DynamicData.dll'. Could not determine winner due to equal file and assembly versions.
Encountered conflict between 'Platform:System.Web.DynamicData.Design.dll' and 'Platform:System.Web.DynamicData.Design.dll'. Could not determine winner due to equal file and assembly versions.
Encountered conflict between 'Platform:System.Web.Extensions.Design.dll' and 'Platform:System.Web.Extensions.Design.dll'. Could not determine winner due to equal file and assembly versions.
Encountered conflict between 'Platform:System.Web.Extensions.dll' and 'Platform:System.Web.Extensions.dll'. Could not determine winner due to equal file and assembly versions.
Encountered conflict between 'Platform:System.Core.dll' and 'Platform:System.Core.dll'. Could not determine winner due to equal file and assembly versions.
Encountered conflict between 'Platform:Microsoft.Build.Conversion.v3.5.dll' and 'Platform:Microsoft.Build.Conversion.v3.5.dll'. Could not determine winner due to equal file and assembly versions.
Encountered conflict between 'Platform:Microsoft.Build.Utilities.v3.5.dll' and 'Platform:Microsoft.Build.Utilities.v3.5.dll'. Could not determine winner due to equal file and assembly versions.
Encountered conflict between 'Platform:Microsoft.Build.Tasks.v3.5.dll' and 'Platform:Microsoft.Build.Tasks.v3.5.dll'. Could not determine winner due to equal file and assembly versions.
Encountered conflict between 'Platform:Microsoft.Build.Engine.dll' and 'Platform:Microsoft.Build.Engine.dll'. Could not determine winner due to equal file and assembly versions.
Encountered conflict between 'Platform:Microsoft.Build.Framework.dll' and 'Platform:Microsoft.Build.Framework.dll'. Could not determine winner due to equal file and assembly versions.
Encountered conflict between 'Platform:System.Data.DataSetExtensions.dll' and 'Platform:System.Data.DataSetExtensions.dll'. Could not determine winner due to equal file and assembly versions.
Encountered conflict between 'Platform:System.AddIn.dll' and 'Platform:System.AddIn.dll'. Could not determine winner due to equal file and assembly versions.
Encountered conflict between 'Platform:System.AddIn.Contract.dll' and 'Platform:System.AddIn.Contract.dll'. Could not determine winner due to equal file and assembly versions.
Encountered conflict between 'Platform:System.Data.Linq.dll' and 'Platform:System.Data.Linq.dll'. Could not determine winner due to equal file and assembly versions.
Encountered conflict between 'Platform:System.Xml.Linq.dll' and 'Platform:System.Xml.Linq.dll'. Could not determine winner due to equal file and assembly versions.
Encountered conflict between 'Platform:System.Management.Instrumentation.dll' and 'Platform:System.Management.Instrumentation.dll'. Could not determine winner due to equal file and assembly versions.
Encountered conflict between 'Platform:System.ServiceModel.Web.dll' and 'Platform:System.ServiceModel.Web.dll'. Could not determine winner due to equal file and assembly versions.
Encountered conflict between 'Platform:System.WorkflowServices.dll' and 'Platform:System.WorkflowServices.dll'. Could not determine winner due to equal file and assembly versions.
Encountered conflict between 'Platform:Microsoft.VisualC.STLCLR.dll' and 'Platform:Microsoft.VisualC.STLCLR.dll'. Could not determine winner due to equal file and assembly versions.
Encountered conflict between 'Platform:Microsoft.VisualC.STLCLR.dll' and 'Platform:Microsoft.VisualC.STLCLR.dll'. Could not determine winner due to equal file and assembly versions.
Encountered conflict between 'Platform:System.Windows.Presentation.dll' and 'Platform:System.Windows.Presentation.dll'. Could not determine winner due to equal file and assembly versions.
Encountered conflict between 'Platform:Sentinel.v3.5Client.dll' and 'Platform:Sentinel.v3.5Client.dll'. Could not determine winner due to equal file and assembly versions.
Encountered conflict between 'Platform:System.Data.Entity.dll' and 'Platform:System.Data.Entity.dll'. Could not determine winner due to equal file and assembly versions.
Encountered conflict between 'Platform:System.Data.Entity.Design.dll' and 'Platform:System.Data.Entity.Design.dll'. Could not determine winner due to equal file and assembly versions.
Encountered conflict between 'Platform:System.Web.Entity.dll' and 'Platform:System.Web.Entity.dll'. Could not determine winner due to equal file and assembly versions.
Encountered conflict between 'Platform:System.Web.Entity.Design.dll' and 'Platform:System.Web.Entity.Design.dll'. Could not determine winner due to equal file and assembly versions.
Encountered conflict between 'Platform:System.Data.Services.dll' and 'Platform:System.Data.Services.dll'. Could not determine winner due to equal file and assembly versions.
Encountered conflict between 'Platform:System.Data.Services.Client.dll' and 'Platform:System.Data.Services.Client.dll'. Could not determine winner due to equal file and assembly versions.
Encountered conflict between 'Platform:System.Data.Services.Design.dll' and 'Platform:System.Data.Services.Design.dll'. Could not determine winner due to equal file and assembly versions.
Encountered conflict between 'Platform:Microsoft.Build.Engine.dll' and 'Platform:Microsoft.Build.Engine.dll'. Choosing 'Platform:Microsoft.Build.Engine.dll' because AssemblyVersion '3.5.0.0' is greater than '2.0.0.0'.
Encountered conflict between 'Platform:Microsoft.Build.Framework.dll' and 'Platform:Microsoft.Build.Framework.dll'. Choosing 'Platform:Microsoft.Build.Framework.dll' because AssemblyVersion '3.5.0.0' is greater than '2.0.0.0'.
Encountered conflict between 'Platform:MSBuild.dll' and 'Platform:MSBuild.dll'. Choosing 'Platform:MSBuild.dll' because AssemblyVersion '3.5.0.0' is greater than '2.0.0.0'.
Done executing task "ResolvePackageFileConflicts".
...
Expected Results
- The conflict message itself it confusing. The message doesn’t indicate what the source of the two “platform” conflicts are. I wouldn’t expect the platform to have conflicts within itself.
- The conflict messages are the majority of the output. I would expect that the build output of a new empty project with the default verbosity would be pretty simple and understandable.
Notes of Interest:
- This appears to be a behavior change introduced in 15.5. The 15.4 output does not include these conflicts.
- The diagnostic output indicates the following TargetFrameworkDirectories are detected
Task Parameter:
TargetFrameworkDirectories=
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\v3.5\
C:\Windows\Microsoft.NET\Framework\v3.5\
"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\v3.0\"
C:\Windows\Microsoft.NET\Framework\v3.0\
C:\Windows\Microsoft.NET\Framework\v2.0.50727\ (TaskId:8)
- The C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\v3.5\RedistList\FrameworkList.xml includes multiple entries for most assemblies.
...
<File AssemblyName="System.Core" Version="3.5.0.0" PublicKeyToken="b77a5c561934e089" Culture="neutral" ProcessorArchitecture="MSIL" InGAC="false" />
<File AssemblyName="System.Core" Version="3.5.0.0" PublicKeyToken="b77a5c561934e089" Culture="neutral" ProcessorArchitecture="MSIL" InGAC="true" />
...
Issue Analytics
- State:
- Created 6 years ago
- Reactions:5
- Comments:11 (5 by maintainers)
Top Results From Across the Web
ResolvePackageFileConflicts is emitting confusing conflict ...
ResolvePackageFileConflicts is emitting confusing conflict messages when building .NET 3.5 projects. · Steps to Reproduce 1. Setup environment ...
Read more >Roslyn error only with .NET Core
I've managed to reproduce this while loading Nodatime with a .Net Core 3.1 project. In order to solve it you can add the...
Read more >Untitled
NET 3.5 project Build - msbuild /t:build The conflict message itself it confusing. The message doesn't indicate what the source of the two...
Read more >ResolvePackageFileConflicts task could not be loaded ...
The "ResolvePackageFileConflicts" task could not be loaded from the assembly C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\ ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Any news on this? The bug is open for almost two years… I am also struggling with megabytes worth of useless log entries.
We’ve encountered this on our TFS 2018 CI builds when building a .NET Framework application which uses .NET Standard libraries, using the Visual Studio Build task (MSBuild).
Excerpt: