New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Misleading error when attempting to install package that depends on design-time facades #2594

Closed
divega opened this Issue Apr 16, 2016 · 3 comments

Comments

Projects
None yet
4 participants
@divega

divega commented Apr 16, 2016

As originally reported at aspnet/Identity#783:

  1. Open Visual Studio 2015 with NuGet Client 3.3 or 3.4.2
  2. File -> New -> Project -> Console Application targeting .NET 4.5.1 or 4.5.2
  3. In PMC, run "Install-Package Microsoft.AspNet.Identity.EntityFramework -Pre -Source nuget.org"

That should install RC1 version of that package but the installation fails midflight and rolls back. The following warnings and errors appear in the output:

...
Added package 'Microsoft.AspNet.Identity.EntityFramework.3.0.0-rc1-final' to folder 'c:\users\divega\documents\visual studio 2015\Projects\ConsoleApplication49\packages'
Install failed. Rolling back...
Package 'Microsoft.AspNet.Identity.EntityFramework.3.0.0-rc1-final : EntityFramework.Relational [7.0.0-rc1-final, ), Microsoft.AspNet.Identity [3.0.0-rc1-final, )' does not exist in project 'ConsoleApplication49'
...
Install-Package : Failed to add reference to 'System.Runtime'. Please make sure that it is in the Global 
Assembly Cache.
At line:1 char:1
+ Install-Package Microsoft.AspNet.Identity.EntityFramework -pre
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Install-Package], Exception
    + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPac 
   kageCommand

I talked to @yishaigalatzer and we believe the reason this fails is that there is a dependency chain into a design-time façade: Microsoft.AspNet.Identity.EntityFramework ->
EntityFramework.Relational ->
System.Diagnostics.DiagnosticSource ->
System.Runtime

This isn't really supported by NuGet. Assuming I understand it correctly this seems to be the issue detailed in #2193. However surprisingly installing EntityFramework.Relational directly works without failure.

Filing this issue specifically because @yishaigalatzer wanted to improve the error, however #2193 might just make the scenario work.

@yishaigalatzer yishaigalatzer added this to the 3.5 RC milestone Apr 18, 2016

jainaashish added a commit to NuGet/NuGet.Client that referenced this issue Apr 19, 2016

Fix NuGet/Home#2594
Updated Error message to reflect correct error and next step.

jainaashish added a commit to NuGet/NuGet.Client that referenced this issue Apr 19, 2016

Fix NuGet/Home#2594
Updated Error message to reflect correct error and next step.
@divega

This comment has been minimized.

Show comment
Hide comment
@divega

divega Apr 20, 2016

@yishaigalatzer I noticed that #2193 is assigned and in the 3.5 RC milestone. Wouldn't the error go away if you fix that one?

divega commented Apr 20, 2016

@yishaigalatzer I noticed that #2193 is assigned and in the 3.5 RC milestone. Wouldn't the error go away if you fix that one?

@divega

This comment has been minimized.

Show comment
Hide comment
@divega

divega Apr 20, 2016

Or perhaps I misread #2193 and that is only about changing that particular package to remove the reference?

divega commented Apr 20, 2016

Or perhaps I misread #2193 and that is only about changing that particular package to remove the reference?

@yishaigalatzer

This comment has been minimized.

Show comment
Hide comment
@yishaigalatzer

yishaigalatzer Apr 21, 2016

2193, is about supporting the scenario. We don’t know if we will be able to make it

From: Diego Vega [mailto:notifications@github.com]
Sent: Wednesday, April 20, 2016 4:36 PM
To: NuGet/Home Home@noreply.github.com
Cc: Yishai Galatzer yigalatz@microsoft.com; Mention mention@noreply.github.com
Subject: Re: [NuGet/Home] Misleading error when attempting to install package that depends on design-time facades (#2594)

@yishaigalatzerhttps://github.com/yishaigalatzer I noticed that #2193#2193 is assigned and in the 3.5 RC milestone. Wouldn't the error go away if you fix that one?


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHubhttps://github.com/NuGet/Home/issues/2594#issuecomment-212652324

yishaigalatzer commented Apr 21, 2016

2193, is about supporting the scenario. We don’t know if we will be able to make it

From: Diego Vega [mailto:notifications@github.com]
Sent: Wednesday, April 20, 2016 4:36 PM
To: NuGet/Home Home@noreply.github.com
Cc: Yishai Galatzer yigalatz@microsoft.com; Mention mention@noreply.github.com
Subject: Re: [NuGet/Home] Misleading error when attempting to install package that depends on design-time facades (#2594)

@yishaigalatzerhttps://github.com/yishaigalatzer I noticed that #2193#2193 is assigned and in the 3.5 RC milestone. Wouldn't the error go away if you fix that one?


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHubhttps://github.com/NuGet/Home/issues/2594#issuecomment-212652324

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment