Package conflicts with aspnet core 2.1

I'm getting package conflicts reported by vs for mac that I don't see with vs windows. The solution still builds.

Steps to replicate

  1. dotnet new mvc --auth individual
  2. rebuild in vs for mac

Versions

Visual Studio for Mac version: Version 7.5.2 Build 40
dotnet version: 2.1.300

Conflicts

Target _HandlePackageFileConflicts:
Encountered conflict between 'Reference:/Users/xxxxxx/.nuget/packages/microsoft.netcore.app/2.1.0/ref/netcoreapp2.1/System.Collections.Immutable.dll' and 'Reference:/Users/xxxxxx/.nuget/packages/system.collections.immutable/1.5.0/lib/netstandard2.0/System.Collections.Immutable.dll'. Choosing 'Reference:/Users/xxxxxx/.nuget/packages/microsoft.netcore.app/2.1.0/ref/netcoreapp2.1/System.Collections.Immutable.dll' because it comes from a package that is preferred.
Encountered conflict between 'Reference:/Users/xxxxxx/.nuget/packages/microsoft.netcore.app/2.1.0/ref/netcoreapp2.1/System.Diagnostics.DiagnosticSource.dll' and 'Reference:/Users/xxxxxx/.nuget/packages/system.diagnostics.diagnosticsource/4.5.0/lib/netstandard1.3/System.Diagnostics.DiagnosticSource.dll'. Choosing 'Reference:/Users/xxxxxx/.nuget/packages/microsoft.netcore.app/2.1.0/ref/netcoreapp2.1/System.Diagnostics.DiagnosticSource.dll' because it comes from a package that is preferred.
Encountered conflict between 'Reference:/Users/xxxxxx/.nuget/packages/microsoft.netcore.app/2.1.0/ref/netcoreapp2.1/System.Linq.Parallel.dll' and 'Reference:/usr/local/share/dotnet/sdk/NuGetFallbackFolder/system.linq.parallel/4.3.0/ref/netstandard1.1/System.Linq.Parallel.dll'. Choosing 'Reference:/Users/xxxxxx/.nuget/packages/microsoft.netcore.app/2.1.0/ref/netcoreapp2.1/System.Linq.Parallel.dll' because AssemblyVersion '4.0.3.0' is greater than '4.0.0.0'.
Encountered conflict between 'Reference:/Users/xxxxxx/.nuget/packages/microsoft.netcore.app/2.1.0/ref/netcoreapp2.1/System.Reflection.Metadata.dll' and 'Reference:/Users/xxxxxx/.nuget/packages/system.reflection.metadata/1.6.0/lib/netstandard2.0/System.Reflection.Metadata.dll'. Choosing 'Reference:/Users/xxxxxx/.nuget/packages/microsoft.netcore.app/2.1.0/ref/netcoreapp2.1/System.Reflection.Metadata.dll' because it comes from a package that is preferred.
Encountered conflict between 'Reference:/Users/xxxxxx/.nuget/packages/microsoft.netcore.app/2.1.0/ref/netcoreapp2.1/System.Runtime.Serialization.Xml.dll' and 'Reference:/usr/local/share/dotnet/sdk/NuGetFallbackFolder/system.runtime.serialization.xml/4.3.0/ref/netstandard1.3/System.Runtime.Serialization.Xml.dll'. Choosing 'Reference:/Users/xxxxxx/.nuget/packages/microsoft.netcore.app/2.1.0/ref/netcoreapp2.1/System.Runtime.Serialization.Xml.dll' because AssemblyVersion '4.1.4.0' is greater than '4.1.1.0'.
Encountered conflict between 'Platform:Microsoft.Win32.Registry.dll' and 'Runtime:/Users/xxxxxx/.nuget/packages/microsoft.win32.registry/4.5.0/lib/netstandard2.0/Microsoft.Win32.Registry.dll'. Choosing 'Platform:Microsoft.Win32.Registry.dll' because it comes from a package that is preferred.
Encountered conflict between 'Platform:System.Collections.Immutable.dll' and 'Runtime:/Users/xxxxxx/.nuget/packages/system.collections.immutable/1.5.0/lib/netstandard2.0/System.Collections.Immutable.dll'. Choosing 'Platform:System.Collections.Immutable.dll' because it comes from a package that is preferred.
Encountered conflict between 'Platform:System.Diagnostics.DiagnosticSource.dll' and 'Runtime:/Users/xxxxxx/.nuget/packages/system.diagnostics.diagnosticsource/4.5.0/lib/netstandard1.3/System.Diagnostics.DiagnosticSource.dll'. Choosing 'Platform:System.Diagnostics.DiagnosticSource.dll' because it comes from a package that is preferred.
Encountered conflict between 'Platform:System.Linq.Parallel.dll' and 'Runtime:/usr/local/share/dotnet/sdk/NuGetFallbackFolder/system.linq.parallel/4.3.0/lib/netstandard1.3/System.Linq.Parallel.dll'. Choosing 'Platform:System.Linq.Parallel.dll' because AssemblyVersion '4.0.3.0' is greater than '4.0.2.0'.
Encountered conflict between 'Platform:System.Reflection.Metadata.dll' and 'Runtime:/Users/xxxxxx/.nuget/packages/system.reflection.metadata/1.6.0/lib/netstandard2.0/System.Reflection.Metadata.dll'. Choosing 'Platform:System.Reflection.Metadata.dll' because it comes from a package that is preferred.
Encountered conflict between 'Platform:System.Runtime.Serialization.Xml.dll' and 'Runtime:/usr/local/share/dotnet/sdk/NuGetFallbackFolder/system.runtime.serialization.xml/4.3.0/lib/netstandard1.3/System.Runtime.Serialization.Xml.dll'. Choosing 'Platform:System.Runtime.Serialization.Xml.dll' because AssemblyVersion '4.1.4.0' is greater than '4.1.2.0'.
Encountered conflict between 'Platform:System.Security.AccessControl.dll' and 'Runtime:/Users/xxxxxx/.nuget/packages/system.security.accesscontrol/4.5.0/lib/netstandard2.0/System.Security.AccessControl.dll'. Choosing 'Platform:System.Security.AccessControl.dll' because it comes from a package that is preferred.
Encountered conflict between 'Platform:System.Security.Cryptography.Cng.dll' and 'Runtime:/Users/xxxxxx/.nuget/packages/system.security.cryptography.cng/4.5.0/lib/netcoreapp2.1/System.Security.Cryptography.Cng.dll'. Choosing 'Platform:System.Security.Cryptography.Cng.dll' because it comes from a package that is preferred.
Encountered conflict between 'Platform:System.Security.Principal.Windows.dll' and 'Runtime:/Users/xxxxxx/.nuget/packages/system.security.principal.windows/4.5.0/lib/netstandard2.0/System.Security.Principal.Windows.dll'. Choosing 'Platform:System.Security.Principal.Windows.dll' because it comes from a package that is preferred.
Encountered conflict between 'Platform:Microsoft.Win32.Registry.dll' and 'Runtime:/Users/xxxxxx/.nuget/packages/microsoft.win32.registry/4.5.0/runtimes/unix/lib/netstandard2.0/Microsoft.Win32.Registry.dll'. Choosing 'Platform:Microsoft.Win32.Registry.dll' because it comes from a package that is preferred.
Encountered conflict between 'Platform:Microsoft.Win32.Registry.dll' and 'Runtime:/Users/xxxxxx/.nuget/packages/microsoft.win32.registry/4.5.0/runtimes/win/lib/netstandard2.0/Microsoft.Win32.Registry.dll'. Choosing 'Platform:Microsoft.Win32.Registry.dll' because it comes from a package that is preferred.
Encountered conflict between 'Platform:System.Security.AccessControl.dll' and 'Runtime:/Users/xxxxxx/.nuget/packages/system.security.accesscontrol/4.5.0/runtimes/win/lib/netcoreapp2.0/System.Security.AccessControl.dll'. Choosing 'Platform:System.Security.AccessControl.dll' because it comes from a package that is preferred.
Encountered conflict between 'Platform:System.Security.Cryptography.Cng.dll' and 'Runtime:/Users/xxxxxx/.nuget/packages/system.security.cryptography.cng/4.5.0/runtimes/win/lib/netcoreapp2.1/System.Security.Cryptography.Cng.dll'. Choosing 'Platform:System.Security.Cryptography.Cng.dll' because it comes from a package that is preferred.
Encountered conflict between 'Platform:System.Security.Principal.Windows.dll' and 'Runtime:/Users/xxxxxx/.nuget/packages/system.security.principal.windows/4.5.0/runtimes/unix/lib/netcoreapp2.0/System.Security.Principal.Windows.dll'. Choosing 'Platform:System.Security.Principal.Windows.dll' because it comes from a package that is preferred.
Encountered conflict between 'Platform:System.Security.Principal.Windows.dll' and 'Runtime:/Users/xxxxxx/.nuget/packages/system.security.principal.windows/4.5.0/runtimes/win/lib/netcoreapp2.0/System.Security.Principal.Windows.dll'. Choosing 'Platform:System.Security.Principal.Windows.dll' because it comes from a package that is preferred.

Answers

  • mattwardmattward GBMember Xamurai

    Not sure what is happening on your machine. Unable to reproduce this when the ASP.NET Core MVC app with auth is created on the Mac - using Visual Studio for Mac 7.5.2 and Mono 5.10.1 and I have .NET Core 2.1.300 and 2.1.200 installed.

    Does it fail from the command line using dotnet restore then dotnet build?

  • dawdawdawdaw Member

    No problem on the command line.

    dotnet restore -f -v d does not report any conflicts unlike vs for mac.

  • mattwardmattward GBMember Xamurai

    The output you have posted is from the build. Does it build locally without those errors using dotnet?

    If there are warnings during restore then it would be useful to compare the obj/project.assets.json file created by dotnet restore and Visual Studio for Mac's restore.

Sign In or Register to comment.