IdentityServer4 icon indicating copy to clipboard operation
IdentityServer4 copied to clipboard

Failed to resolve conflicts for .NETCoreApp, Version=v1.1.

Open nozer opened this issue 9 years ago • 8 comments

Issue / Steps to reproduce the problem

I am on MacOS with Visual Studio Code and am trying to install IdentityServer4 after creating a fresh Empty Web Application via >dotnet new web. It is returning errors. Here is the .csproj file contents:

<Project Sdk="Microsoft.NET.Sdk.Web">

  <PropertyGroup>
    <TargetFramework>netcoreapp1.1</TargetFramework>
  </PropertyGroup>

  <ItemGroup>
    <Folder Include="wwwroot\" />
  </ItemGroup>

  <ItemGroup>
    <PackageReference Include="Microsoft.AspNetCore" Version="1.1.1" />
    <PackageReference Include="IdentityServer4" Version="1.0.0" />
  </ItemGroup>

</Project>

If I repeat these on a docker (with image FROM microsoft/dotnet:1.1.1-sdk), it works.

Relevant parts of the log file

   Restoring packages for /Users/myname/Developing/Experiments/identityserver4/identityserver4.csproj...
/usr/local/share/dotnet/sdk/1.0.1/NuGet.targets(97,5): error : Failed to resolve conflicts for .NETCoreApp,Version=v1.1. [/Users/myname/Developing/Experiments/identityserver4/identityserver4.csproj]
/usr/local/share/dotnet/sdk/1.0.1/NuGet.targets(97,5): error : Unable to satisfy conflicting requests for 'identityserver4': project/identityserver4 (>= 1.0.0) (via project/identityserver4 1.0.0) [/Users/myname/Developing/Experiments/identityserver4/identityserver4.csproj]
/usr/local/share/dotnet/sdk/1.0.1/NuGet.targets(97,5): error : Unable to satisfy conflicting requests for 'Microsoft.NETCore.App': Microsoft.NETCore.App (>= 1.1.1) (via project/identityserver4 1.0.0) [/Users/myname/Developing/Experiments/identityserver4/identityserver4.csproj]
/usr/local/share/dotnet/sdk/1.0.1/NuGet.targets(97,5): error : Unable to satisfy conflicting requests for 'Microsoft.AspNetCore': Microsoft.AspNetCore (>= 1.1.1) (via project/identityserver4 1.0.0) [/Users/myname/Developing/Experiments/identityserver4/identityserver4.csproj]
/usr/local/share/dotnet/sdk/1.0.1/NuGet.targets(97,5): error : Unable to satisfy conflicting requests for 'IdentityServer4': IdentityServer4 (>= 1.0.0) (via project/identityserver4 1.0.0) [/Users/myname/Developing/Experiments/identityserver4/identityserver4.csproj]
/usr/local/share/dotnet/sdk/1.0.1/NuGet.targets(97,5): error : Unable to satisfy conflicting requests for 'Libuv': Libuv (>= 1.9.1) (via package/Microsoft.NETCore.App 1.1.1), Libuv (>= 1.9.1) (via package/Microsoft.AspNetCore.Server.Kestrel 1.1.1) [/Users/myname/Developing/Experiments/identityserver4/identityserver4.csproj]
/usr/local/share/dotnet/sdk/1.0.1/NuGet.targets(97,5): error : Unable to satisfy conflicting requests for 'Microsoft.CodeAnalysis.CSharp': Microsoft.CodeAnalysis.CSharp (>= 1.3.0) (via package/Microsoft.NETCore.App 1.1.1) [/Users/myname/Developing/Experiments/identityserver4/identityserver4.csproj]
/usr/local/share/dotnet/sdk/1.0.1/NuGet.targets(97,5): error : Unable to satisfy conflicting requests for 'Microsoft.CodeAnalysis.VisualBasic': Microsoft.CodeAnalysis.VisualBasic (>= 1.3.0) (via package/Microsoft.NETCore.App 1.1.1) [/Users/myname/Developing/Experiments/identityserver4/identityserver4.csproj]
/usr/local/share/dotnet/sdk/1.0.1/NuGet.targets(97,5): error : Unable to satisfy conflicting requests for 'Microsoft.CSharp': Microsoft.CSharp (>= 4.3.0) (via package/Microsoft.NETCore.App 1.1.1), Microsoft.CSharp (>= 4.0.1) (via package/Newtonsoft.Json 9.0.1), Microsoft.CSharp (>= 4.0.1) (via package/Newtonsoft.Json 9.0.1), Microsoft.CSharp (>= 4.0.1) (via package/Newtonsoft.Json 9.0.1) [/Users/myname/Developing/Experiments/identityserver4/identityserver4.csproj]
/usr/local/share/dotnet/sdk/1.0.1/NuGet.targets(97,5): error : Unable to satisfy conflicting requests for 'Microsoft.DiaSymReader.Native': Microsoft.DiaSymReader.Native (>= 1.4.1) (via package/Microsoft.NETCore.App 1.1.1) [/Users/myname/Developing/Experiments/identityserver4/identityserver4.csproj]
/usr/local/share/dotnet/sdk/1.0.1/NuGet.targets(97,5): error : Unable to satisfy conflicting requests for 'Microsoft.NETCore.DotNetHostPolicy': Microsoft.NETCore.DotNetHostPolicy (>= 1.1.0) (via package/Microsoft.NETCore.App 1.1.1) [/Users/myname/Developing/Experiments/identityserver4/identityserver4.csproj]
/usr/local/share/dotnet/sdk/1.0.1/NuGet.targets(97,5): error : Unable to satisfy conflicting requests for 'Microsoft.NETCore.Runtime.CoreCLR': Microsoft.NETCore.Runtime.CoreCLR (>= 1.1.1) (via package/Microsoft.NETCore.App 1.1.1) [/Users/myname/Developing/Experiments/identityserver4/identityserver4.csproj]
/usr/local/share/dotnet/sdk/1.0.1/NuGet.targets(97,5): error : Unable to satisfy conflicting requests for 'Microsoft.VisualBasic': Microsoft.VisualBasic (>= 10.1.0) (via package/Microsoft.NETCore.App 1.1.1) [/Users/myname/Developing/Experiments/identityserver4/identityserver4.csproj]
/usr/local/share/dotnet/sdk/1.0.1/NuGet.targets(97,5): error : Unable to satisfy conflicting requests for 'NETStandard.Library': NETStandard.Library (>= 1.6.1) (via package/Microsoft.NETCore.App 1.1.1), NETStandard.Library (>= 1.6.1) (via package/Microsoft.AspNetCore 1.1.1), NETStandard.Library (>= 1.6.1) (via package/Microsoft.Extensions.DependencyInjection.Abstractions 1.1.0), NETStandard.Library (>= 1.6.1) (via package/Microsoft.Extensions.Options.ConfigurationExtensions 1.1.0), NETStandard.Library (>= 1.6.1) (via package/Microsoft.Extensions.Caching.Abstractions 1.1.0), NETStandard.Library (>= 1.6.1) (via package/Microsoft.Extensions.Caching.Memory 1.1.0), NETStandard.Library (>= 1.6.1) (via package/Microsoft.AspNetCore.Http.Abstractions 1.1.0), NETStandard.Library (>= 1.6.1) (via package/Microsoft.AspNetCore.Cors 1.1.0), NETStandard.Library (>= 1.6.1) (via package/Microsoft.AspNetCore.Authentication.Cookies 1.1.0) [/Users/myname/Developing/Experiments/identityserver4/identityserver4.csproj]
/usr/local/share/dotnet/sdk/1.0.1/NuGet.targets(97,5): error : Unable to satisfy conflicting requests for 'System.Buffers': System.Buffers (>= 4.3.0) (via package/Microsoft.NETCore.App 1.1.1), System.Buffers (>= 4.3.0) (via package/Microsoft.AspNetCore.Server.Kestrel 1.1.1), System.Buffers (>= 4.3.0) (via package/Microsoft.AspNetCore.Http.Extensions 1.1.1), System.Buffers (>= 4.3.0) (via package/Microsoft.AspNetCore.WebUtilities 1.1.1), System.Buffers (>= 4.3.0) (via package/Microsoft.AspNetCore.Http 1.1.1), System.Buffers (>= 4.3.0) (via package/Microsoft.AspNetCore.Http.Extensions 1.1.1), System.Buffers (>= 4.3.0) (via package/Microsoft.AspNetCore.Http.Extensions 1.1.1), System.Buffers (>= 4.3.0) (via package/Microsoft.AspNetCore.Http 1.1.1), System.Buffers (>= 4.3.0) (via package/Microsoft.AspNetCore.Http.Extensions 1.1.1), System.Buffers (>= 4.3.0) (via package/System.IO.Compression 4.3.0), System.Buffers (>= 4.3.0) (via package/System.IO.Compression.ZipFile 4.3.0), System.Buffers (>= 4.3.0) (via package/Microsoft.AspNetCore.Http.Extensions 1.1.0), System.Buffers (>= 4.3.0) (via package/System.IO.Compression 4.3.0), System.Buffers (>= 4.3.0) (via package/System.IO.Compression 4.3.0), System.Buffers (>= 4.3.0) (via package/System.IO.Compression 4.3.0), System.Buffers (>= 4.3.0) (via package/System.IO.Compression.ZipFile 4.3.0), System.Buffers (>= 4.3.0) (via package/System.IO.Compression 4.3.0), System.Buffers (>= 4.3.0) (via package/System.IO.Compression.ZipFile 4.3.0), System.Buffers (>= 4.3.0) (via package/System.IO.Compression 4.3.0), System.Buffers (>= 4.3.0) (via package/System.IO.Compression.ZipFile 4.3.0), System.Buffers (>= 4.3.0) (via package/System.IO.Compression 4.3.0), System.Buffers (>= 4.3.0) (via package/System.IO.Compression.ZipFile 4.3.0), System.Buffers (>= 4.3.0) (via package/System.IO.Compression 4.3.0), System.Buffers (>= 4.3.0) (via package/System.IO.Compression.ZipFile 4.3.0), System.Buffers (>= 4.3.0) (via package/System.IO.Compression 4.3.0), System.Buffers (>= 4.3.0) (via package/System.IO.Compression.ZipFile 4.3.0), System.Buffers (>= 4.3.0) (via package/Microsoft.AspNetCore.Http 1.1.0), System.Buffers (>= 4.3.0) (via package/Microsoft.AspNetCore.Http.Extensions 1.1.0), System.Buffers (>= 4.3.0) (via package/System.IO.Compression 4.3.0), System.Buffers (>= 4.3.0) (via package/System.IO.Compression.ZipFile 4.3.0) [/Users/myname/Developing/Experiments/identityserver4/identityserver4.csproj]
/usr/local/share/dotnet/sdk/1.0.1/NuGet.targets(97,5): error : Unable to satisfy conflicting requests for 'System.Collections.Immutable': System.Collections.Immutable (>= 1.3.0) (via package/Microsoft.NETCore.App 1.1.1), System.Collections.Immutable (>= 1.3.0) (via package/System.Reflection.Metadata 1.4.1), System.Collections.Immutable (>= 1.3.0) (via package/System.Reflection.Metadata 1.4.1) [/Users/myname/Developing/Experiments/identityserver4/identityserver4.csproj]
/usr/local/share/dotnet/sdk/1.0.1/NuGet.targets(97,5): error : Unable to satisfy conflicting requests for 'System.ComponentModel': System.ComponentModel (>= 4.3.0) (via package/Microsoft.NETCore.App 1.1.1), System.ComponentModel (>= 4.3.0) (via package/Microsoft.Extensions.DependencyInjection.Abstractions 1.1.0), System.ComponentModel (>= 4.3.0) (via package/Microsoft.Extensions.Options 1.1.1), System.ComponentModel (>= 4.3.0) (via package/Microsoft.Extensions.Options 1.1.1), System.ComponentModel (>= 4.3.0) (via package/Microsoft.Extensions.Options 1.1.1), System.ComponentModel (>= 4.3.0) (via package/Microsoft.Extensions.Options 1.1.1), System.ComponentModel (>= 4.3.0) (via package/Microsoft.Extensions.DependencyInjection.Abstractions 1.1.0), System.ComponentModel (>= 4.3.0) (via package/Microsoft.Extensions.DependencyInjection.Abstractions 1.1.0), System.ComponentModel (>= 4.3.0) (via package/Microsoft.Extensions.Options 1.1.1), System.ComponentModel (>= 4.3.0) (via package/Microsoft.Extensions.Options 1.1.0), System.ComponentModel (>= 4.3.0) (via package/Microsoft.Extensions.Options 1.1.0), System.ComponentModel (>= 4.3.0) (via package/Microsoft.AspNetCore.Http.Features 1.1.0), System.ComponentModel (>= 4.3.0) (via package/Microsoft.Extensions.Options 1.1.0), System.ComponentModel (>= 4.3.0) (via package/Microsoft.Extensions.Options 1.1.0), 
...
removed too much data 
...
[/Users/myname/Developing/Experiments/identityserver4/identityserver4.csproj]
/usr/local/share/dotnet/sdk/1.0.1/NuGet.targets(97,5): error : Sequence contains more than one matching element [/Users/myname/Developing/Experiments/identityserver4/identityserver4.csproj]
Done: 1.

nozer avatar Mar 15 '17 14:03 nozer

Try updating everything to latest.

leastprivilege avatar Mar 17 '17 14:03 leastprivilege

Thanks. Will do.

nozer avatar Mar 17 '17 14:03 nozer

Still an issue for me, everything is latest.

michielvermeir avatar Apr 26 '17 08:04 michielvermeir

TL;DR Seems there's an issue with the .NET Core tooling (quelle surprise). Sharing story here in case someone else stumbles on this.


I've also had the same issue..

  • Visual Studio 2017: 15.1 (26403.7)
  • .NET Core: 1.0.3

Install-Package IdentityServer4 failing on a new project based on the "Empty" ASP.NET Core project template.

Here's what I've tried:

  1. Update VS
  2. Update .NET Core SDK

At this point - I was unsure of what else I could even update - so then started thinking along the lines of versioning issues, because, .NET Core 😉

  1. Cleared All NuGet Caches (Options > NuGet Package Manager > Clear All Caches)

Looked very promising, but once packages were downloaded - still the same problem. 😠

At this point, I am scratching my head and questioning my life choices - when I noticed something...

Install-Package : Failed to resolve conflicts for .NETCoreApp,Version=v1.1.
At line:1 char:1
+ Install-Package IdentityServer4
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Install-Package], Exception
    + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
 
Install-Package : Unable to satisfy conflicting requests for 'IdentityServer4': project/IdentityServer4 

I wondered:

Is it possible it's not liking the Project name also being IdentityServer4?

So - I "File > New Project'd" and did the exact same steps and everything was fine!

Repro

I cleared everything. very reproducible:

  1. Create a Project with the name IdentityServer4.
  2. Install-Package IdentityServer4
  3. Observe a whole lot of red.

Fix

  1. Rename/create new Project not called IdentityServer4.
  2. Install-Package IdentityServer4
  3. Be happy 😄

The Root Cause

At this point - I am thinking there's something weird going on, so I did this:

  1. File > New Project > Class Library (.NET Core)
  2. Name the Project xunit.
  3. Install-Package xunit
  4. Observe the world implode.

So - I'll look at getting these notes reported to the right people :smile:

Hope this helps!!

robcthegeek avatar May 09 '17 16:05 robcthegeek

I got the same error when I named my vs2017 (15.2) project Serilog (for demo purpose) and after that tried to add Serilog package and boom. This is definitively tooling issue.

neman avatar May 25 '17 12:05 neman

I'm getting the same thing for random packages that I'm trying to install. And if I would start a new project I would be able to install them. Any solution?

developer82 avatar Jun 02 '17 20:06 developer82

This is DEFINITELY still an issue today with current tools for .NET Core 2.0. I had renamed a project to 'IdentityServer4' and of course it had the package of the same name included. It went to heck for no apparent reason. I found this post, changed the name, and now it works just like it did previously.

VincePlatt avatar Oct 25 '17 00:10 VincePlatt

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

lock[bot] avatar Jan 14 '20 04:01 lock[bot]