Skip to content
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

Windows 10, VS2015U3, NuGet 3.5 install package issue with Facade assemblies #3103

Closed
niemyjski opened this issue Jul 9, 2016 · 8 comments
Closed

Comments

@niemyjski
Copy link

niemyjski commented Jul 9, 2016

I created a new ASP.NET MVC Project (.NET 4.5.1) and then opened the package manager console and tried to install our package...

PM> Install-Package Exceptionless -Version 4.0.1880-Pre -Verbose


Attempting to gather dependency information for package 'Exceptionless.4.0.1880-Pre' with respect to project 'WebApplication8', targeting '.NETFramework,Version=v4.5.1'
  GET https://api.nuget.org/v3/registration1-gz/exceptionless/index.json
  OK https://api.nuget.org/v3/registration1-gz/exceptionless/index.json 119ms
  GET https://api.nuget.org/v3/registration1-gz/exceptionless/page/4.0.1873-pre/4.0.1880-pre.json
  OK https://api.nuget.org/v3/registration1-gz/exceptionless/page/4.0.1873-pre/4.0.1880-pre.json 64ms
Total number of results gathered : 31
Gathering dependency information took 458.63 ms
Summary of time taken to gather dependencies per source :
https://api.nuget.org/v3/index.json -   203.31 ms
Attempting to resolve dependencies for package 'Exceptionless.4.0.1880-Pre' with DependencyBehavior 'Lowest'
Resolving dependency information took 0 ms
Resolving actions to install package 'Exceptionless.4.0.1880-Pre'
Resolved actions to install package 'Exceptionless.4.0.1880-Pre'
Retrieving package 'Exceptionless 4.0.1880-pre' from 'nuget.org'.
For adding package 'Exceptionless.4.0.1880-pre' to project 'WebApplication8' that targets 'net451'.
For adding package 'Exceptionless.4.0.1880-pre' to project 'WebApplication8' that targets 'net451'.
Adding package 'Exceptionless.4.0.1880-pre' to folder '\\mac\home\documents\visual studio 2015\Projects\WebApplication8\packages'
Added package 'Exceptionless.4.0.1880-pre' to folder '\\mac\home\documents\visual studio 2015\Projects\WebApplication8\packages'
Removed reference 'Exceptionless.dll' from project 'WebApplication8'
Added reference 'Exceptionless' to project 'WebApplication8'.
Install failed. Rolling back...
Package 'Exceptionless.4.0.1880-pre' does not exist in project 'WebApplication8'
Removing package 'Exceptionless.4.0.1880-pre' from folder '\\mac\home\documents\visual studio 2015\Projects\WebApplication8\packages'
Removed folder '\\mac\home\documents\visual studio 2015\Projects\WebApplication8\packages\Exceptionless.4.0.1880-pre\lib\portable46-net451+win81+wpa81'.
Removed folder '\\mac\home\documents\visual studio 2015\Projects\WebApplication8\packages\Exceptionless.4.0.1880-pre\lib\netstandard1.2'.
Removed folder '\\mac\home\documents\visual studio 2015\Projects\WebApplication8\packages\Exceptionless.4.0.1880-pre\lib\netstandard1.3'.
Removed folder '\\mac\home\documents\visual studio 2015\Projects\WebApplication8\packages\Exceptionless.4.0.1880-pre\lib\netstandard1.4'.
Removed folder '\\mac\home\documents\visual studio 2015\Projects\WebApplication8\packages\Exceptionless.4.0.1880-pre\lib\netstandard1.5'.
Removed folder '\\mac\home\documents\visual studio 2015\Projects\WebApplication8\packages\Exceptionless.4.0.1880-pre\lib\net45'.
Removed folder '\\mac\home\documents\visual studio 2015\Projects\WebApplication8\packages\Exceptionless.4.0.1880-pre\lib'.
Removed file 'Exceptionless.4.0.1880-pre.nupkg' from folder '\\mac\home\documents\visual studio 2015\Projects\WebApplication8\packages\Exceptionless.4.0.1880-pre'.
Removed folder '\\mac\home\documents\visual studio 2015\Projects\WebApplication8\packages\Exceptionless.4.0.1880-pre'.
Removed package 'Exceptionless.4.0.1880-pre' from folder '\\mac\home\documents\visual studio 2015\Projects\WebApplication8\packages'
Executing nuget actions took 2.19 sec
Install-Package : Failed to add reference. The package 'Exceptionless' tried to add a framework reference to 'System.Runtime' which was not found in the GAC. This is possibly a bug in the package. Please contact the package owners for assistance.
At line:1 char:1
+ Install-Package Exceptionless -Version 4.0.1880-Pre -Verbose
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Install-Package], Exception
    + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand

Time Elapsed: 00:00:02.6831588
PM> 

https://www.nuget.org/packages/Exceptionless/4.0.1880-pre

And I get an install error Install-Package : Failed to add reference. The package 'Exceptionless' tried to add a framework reference to 'System.Runtime' which was not found in the GAC. This is possibly a bug in the package. Please contact the package owners for assistance. The issue is my package doesn't define any assembly references (only in the .net standard packages...) I don't get why it's happening. Also, it seemsl ike the exceptionless packages folder is removed but the assembly reference isn't removed from the project references list.

screen shot 2016-07-09 at 10 21 09 am

@niemyjski
Copy link
Author

Please let me know if this is in the wrong repo.

@scottcate
Copy link

I'm experiencing this same issue. Thank you for any guidance.

@niemyjski
Copy link
Author

My latest commit (exceptionless/Exceptionless.Net@c7becdb) seems to have fixed it. I changed the portable projects framework dependencies to build time.. Which is crazy because my net451 project shouldn't even be looking at the portable projects dependencies..

@niemyjski niemyjski reopened this Jul 9, 2016
@niemyjski
Copy link
Author

There is an issue here that needs to be resolved asap... There seems to be an installer issue when you have frameworkAssemblies that are not a build time dependency..

@shanselman
Copy link

I need more information to route this. Do you think this is a NuGet issue, or a VS issue? What went wrong, when? @csharpfritz

@niemyjski
Copy link
Author

niemyjski commented Jul 12, 2016

I think it's a nuget issue, package install just fails. You can reproduce it very easily..

{
  "frameworks": {
    "netstandard1.0": {
      "dependencies": {
        "System.Collections": "4.0.11",
        "System.Runtime": "4.1.0"
      }
    },
    ".NETPortable,Version=v4.5,Profile=Profile259": {
      "frameworkAssemblies": {
        "System.Collections": "",
        "System.Runtime": ""
      }
    }
  }
}

Then create a new NET45+ Console app (You can even remove all the project dependencies) and try to install the package. It will pick the . NETPortable framework and fail with a gac issue for collections or runtime. I've seen the same if you define full framework and have hit it in all of our exceptionless packages.

If you don't want to define a simple package just use @StephenCleary's package https://www.nuget.org/packages/Nito.Collections.Deque/1.0.0-delta-8

@StephenCleary
Copy link

StephenCleary commented Jul 12, 2016

Note that Nito.Collections.Deque 1.0.0-delta-9 works around this problem by making its framework assemblies build-time dependencies, similar to this:

".NETPortable,Version=v4.5,Profile=Profile259": {
  "frameworkAssemblies": {
    "System.Collections": { "type": "build" },
    "System.Runtime": { "type": "build" }
  }
}

But this feels wrong to me, since they are not build-only dependencies.

@rrelyea rrelyea changed the title Windows 10, VS2015U3, NuGet 3.5 install package issue Windows 10, VS2015U3, NuGet 3.5 install package issue with Facade assemblies Jul 12, 2016
@rrelyea
Copy link
Contributor

rrelyea commented Jul 12, 2016

@StephenCleary has the right workaround, we believe.
#2193 deals with Façade assemblies. Let's close this issue, as it is a dupe of that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants