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

"The package 'NLog' tried to add a framework reference to 'System.IO.Compression' which was not found in the GAC." when the assembly, in fact, is in the GAC #5812

Open
sandersaares opened this issue Aug 28, 2017 · 4 comments
Labels
Functionality:Install The install command in VS/nuget.exe Priority:3 Issues under consideration. With enough upvotes, will be reconsidered to be added to the backlog. Product:VS.Client Status:Excluded from icebox cleanup Status:Inactive Icebox issues not updated for a specific long time Triage:Investigate
Milestone

Comments

@sandersaares
Copy link

sandersaares commented Aug 28, 2017

NuGet product used: VS UI

NuGet version (x.x.x.xxx): 4.3.0

dotnet.exe --version (if appropriate): N/A

VS version (if appropriate): 15.3.2

OS version (i.e. win10 v1607 (14393.321)): Windows 10 1703 (15063.540)

Worked before? If so, with which NuGet version: unknown

Detailed repro steps so we can see the same problem

  1. Create a new .NET Standard 2.0 library project.
  2. Add a new .NET Framework 4.7 unit test project.
  3. Add a reference the class library.
  4. Attempt to install NLog 5.0.0-beta09 into the unit test project.
Attempting to gather dependency information for package 'NLog.5.0.0-beta09' with respect to project 'Tests.NetFramework', targeting '.NETFramework,Version=v4.7'
Gathering dependency information took 662,02 ms
Attempting to resolve dependencies for package 'NLog.5.0.0-beta09' with DependencyBehavior 'Lowest'
Resolving dependency information took 0 ms
Resolving actions to install package 'NLog.5.0.0-beta09'
Resolved actions to install package 'NLog.5.0.0-beta09'
Found package 'NLog 5.0.0-beta09' in 'C:\Source\Toolkit\packages'.
Package 'NLog.5.0.0-beta09' already exists in folder 'C:\Source\Toolkit\packages'
Install failed. Rolling back...
Package 'NLog.5.0.0-beta09' does not exist in project 'Tests.NetFramework'
Executing nuget actions took 1,1 sec
Failed to add reference. The package 'NLog' tried to add a framework reference to 'System.IO.Compression' which was not found in the GAC. This is possibly a bug in the package. Please contact the package owners for assistance.
  Reference unavailable.
Time Elapsed: 00:00:01.7830560
========== Finished ==========

Looking at GAC contents does show me what appears to be System.IO.Compression at c:\Windows\Microsoft.NET\assembly\GAC_MSIL\System.IO.Compression\v4.0_4.0.0.0__b77a5c561934e089\System.IO.Compression.dll. It is not clear to me why NuGet says it cannot be found in the GAC.

The NLog install works fine if you remove the reference to the .NET Standard 2.0 library project.

Installing System.IO.Compression from NuGet seems to slightly move things along but it is not clear why and this should not be needed - System.IO.Compression is already in .NET Framework, there should be no need for any NuGet package here.

See also NLog/NLog#2255

@wburchard
Copy link

I've encountered precisely the same problem.

@rohit21agrawal
Copy link
Contributor

@sandersaares @wburchard i am not able to repro this problem at my end using the steps you described. can either of you attach a repro project?

Thanks.

@sandersaares
Copy link
Author

Here you go: https://github.com/sandersaares/repro-nuget-5812

Just attempt to install latest prerelease of NLog into the unit test project there (currently 5.0.0-beta11 for me). This will result in Failed to add reference. The package 'NLog' tried to add a framework reference to 'System.IO.Compression' which was not found in the GAC. This is possibly a bug in the package. Please contact the package owners for assistance.

@rohit21agrawal
Copy link
Contributor

@PatoBeltran could you take a look at this and find a repro?

@nkolev92 nkolev92 added this to the Backlog milestone Oct 18, 2017
@ghost ghost added the Status:Inactive Icebox issues not updated for a specific long time label Sep 1, 2022
@jeffkl jeffkl added Priority:3 Issues under consideration. With enough upvotes, will be reconsidered to be added to the backlog. and removed Pipeline:Icebox labels Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Functionality:Install The install command in VS/nuget.exe Priority:3 Issues under consideration. With enough upvotes, will be reconsidered to be added to the backlog. Product:VS.Client Status:Excluded from icebox cleanup Status:Inactive Icebox issues not updated for a specific long time Triage:Investigate
Projects
None yet
Development

No branches or pull requests

6 participants