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

Cannot install some packages in VS15 Community on Win10 (Both command and GUI) #1470

Closed
maartenba opened this issue Sep 28, 2015 · 42 comments
Closed
Assignees
Labels
Milestone

Comments

@maartenba
Copy link
Contributor

From @heku on September 27, 2015 2:53

PM> install-package System.Data.SQLite -dependencyversion highestminor
Attempting to gather dependencies information for package 'System.Data.SQLite.1.0.98.1' with respect to project 'OralEval.Infrastructure.Repositories', targeting '.NETFramework,Version=v4.0'
Attempting to resolve dependencies for package 'System.Data.SQLite.1.0.98.1' with DependencyBehavior 'HighestMinor'
Resolving actions to install package 'System.Data.SQLite.1.0.98.1'
Resolved actions to install package 'System.Data.SQLite.1.0.98.1'
Adding package 'EntityFramework.6.1.3' to folder 'C:\Codes\OralEval\packages'
Added package 'EntityFramework.6.1.3' to folder 'C:\Codes\OralEval\packages'
'App.config' already exists. Skipping...
Added package 'EntityFramework.6.1.3' to 'packages.config'
Executing script file 'C:\Codes\OralEval\packages\EntityFramework.6.1.3\tools\init.ps1'
Executing script file 'C:\Codes\OralEval\packages\EntityFramework.6.1.3\tools\install.ps1'

Unable to find type [NuGet.VisualStudio.IVsPackageInstallerServices].

At C:\Codes\OralEval\packages\EntityFramework.6.1.3\tools\EntityFramework.psm1:1004 char:5

  • $packageInstallerServices = $componentModel.GetService([NuGet.Vis ...
    
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (NuGet.VisualStu...stallerServices:TypeName) [], RuntimeException
    • FullyQualifiedErrorId : TypeNotFound

You cannot call a method on a null-valued expression.
At C:\Codes\OralEval\packages\EntityFramework.6.1.3\tools\EntityFramework.psm1:1006 char:5

  • $vsPackage = $packageInstallerServices.GetInstalledPackages() | ? ...
    
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : InvokeMethodOnNull

Join-Path : Cannot bind argument to parameter 'Path' because it is null.
At C:\Codes\OralEval\packages\EntityFramework.6.1.3\tools\EntityFramework.psm1:740 char:28

  • $toolsPath = Join-Path $installPath tools
    
  •                        ~~~~~~~~~~~~
    
    • CategoryInfo : InvalidData: (:) [Join-Path], ParameterBindingValidationException
    • FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.JoinPathCommand

Join-Path : Cannot bind argument to parameter 'Path' because it is null.
At C:\Codes\OralEval\packages\EntityFramework.6.1.3\tools\EntityFramework.psm1:780 char:74

  • ... [System.Reflection.Assembly]::LoadFrom((Join-Path $ToolsPath EntityF ...
  •                                                    ~~~~~~~~~~
    
    • CategoryInfo : InvalidData: (:) [Join-Path], ParameterBindingValidationException
    • FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.JoinPathCommand

You cannot call a method on a null-valued expression.
At C:\Codes\OralEval\packages\EntityFramework.6.1.3\tools\EntityFramework.psm1:781 char:5

  • $dispatcher = $utilityAssembly.CreateInstance(
    
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : InvokeMethodOnNull

Join-Path : Cannot bind argument to parameter 'Path' because it is null.
At C:\Codes\OralEval\packages\EntityFramework.6.1.3\tools\EntityFramework.psm1:810 char:20

  •     (Join-Path $runner.ToolsPath EntityFramework.PowerShell.dll),
    
  •                ~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidData: (:) [Join-Path], ParameterBindingValidationException
    • FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.JoinPathCommand

Unable to find type [NuGet.VisualStudio.IVsPackageInstallerServices].
At C:\Codes\OralEval\packages\EntityFramework.6.1.3\tools\EntityFramework.psm1:1004 char:5

  • $packageInstallerServices = $componentModel.GetService([NuGet.Vis ...
    
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (NuGet.VisualStu...stallerServices:TypeName) [], RuntimeException
    • FullyQualifiedErrorId : TypeNotFound

You cannot call a method on a null-valued expression.
At C:\Codes\OralEval\packages\EntityFramework.6.1.3\tools\EntityFramework.psm1:1006 char:5

  • $vsPackage = $packageInstallerServices.GetInstalledPackages() | ? ...
    
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : InvokeMethodOnNull

Join-Path : Cannot bind argument to parameter 'Path' because it is null.
At C:\Codes\OralEval\packages\EntityFramework.6.1.3\tools\EntityFramework.psm1:740 char:28

  • $toolsPath = Join-Path $installPath tools
    
  •                        ~~~~~~~~~~~~
    
    • CategoryInfo : InvalidData: (:) [Join-Path], ParameterBindingValidationException
    • FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.JoinPathCommand

Join-Path : Cannot bind argument to parameter 'Path' because it is null.
At C:\Codes\OralEval\packages\EntityFramework.6.1.3\tools\EntityFramework.psm1:780 char:74

  • ... [System.Reflection.Assembly]::LoadFrom((Join-Path $ToolsPath EntityF ...
  •                                                    ~~~~~~~~~~
    
    • CategoryInfo : InvalidData: (:) [Join-Path], ParameterBindingValidationException
    • FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.JoinPathCommand

You cannot call a method on a null-valued expression.
At C:\Codes\OralEval\packages\EntityFramework.6.1.3\tools\EntityFramework.psm1:781 char:5

  • $dispatcher = $utilityAssembly.CreateInstance(
    
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : InvokeMethodOnNull

Join-Path : Cannot bind argument to parameter 'Path' because it is null.
At C:\Codes\OralEval\packages\EntityFramework.6.1.3\tools\EntityFramework.psm1:810 char:20

  •     (Join-Path $runner.ToolsPath EntityFramework.PowerShell.dll),
    
  •                ~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidData: (:) [Join-Path], ParameterBindingValidationException
    • FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.JoinPathCommand

Type 'get-help EntityFramework' to see all available Entity Framework commands.
Successfully installed 'EntityFramework 6.1.3' to OralEval.Infrastructure.Repositories
Install failed. Rolling back...
Package 'System.Data.SQLite.Core 1.0.98.1' does not exist in project 'OralEval.Infrastructure.Repositories'
Removed package 'EntityFramework 6.1.3' from 'packages.config'
Package 'System.Data.SQLite.Core 1.0.98.1' does not exist in folder 'C:\Codes\OralEval\packages'
Removing package 'EntityFramework 6.1.3' from folder 'C:\Codes\OralEval\packages'
Removed package 'EntityFramework 6.1.3' from folder 'C:\Codes\OralEval\packages'
install-package : Object reference not set to an instance of an object.
At line:1 char:1

  • install-package System.Data.SQLite -dependencyversion highestminor
  • - CategoryInfo          : NotSpecified: (:) [Install-Package], Exception
    - FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
    
    

Copied from original issue: NuGet/NuGetGallery#2703

@yishaigalatzer
Copy link

Can you please update to NuGet 3.2 from the gallery? I don't see this issue reproducing on my machine.

@heku
Copy link

heku commented Sep 29, 2015

THX for the reply, it is 3.2 already.

@heku
Copy link

heku commented Sep 29, 2015

Not only above problem, here is another one.

Attempting to gather dependencies information for package 'EntityFramework.6.1.3' with respect to project 'NugetTest', targeting '.NETFramework,Version=v4.0'
Attempting to resolve dependencies for package 'EntityFramework.6.1.3' with DependencyBehavior 'HighestMinor'
Resolving actions to install package 'EntityFramework.6.1.3'
Resolved actions to install package 'EntityFramework.6.1.3'
System.Threading.Tasks.TaskCanceledException: A task was canceled.
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter1.GetResult() at NuGet.Protocol.Core.v3.DependencyInfo.Utils.<LoadResource>d__3.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter1.GetResult()
at NuGet.Protocol.Core.v3.DependencyInfo.Utils.d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter1.GetResult() at NuGet.Protocol.Core.v3.RegistrationResourceV3.<GetPackageMetadata>d__10.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter1.GetResult()
at NuGet.Protocol.Core.v3.RegistrationResourceV3.d__9.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at NuGet.Protocol.VisualStudio.UIMetadataResourceV3.d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at NuGet.PackageManagement.UI.UIActionEngine.d__10.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at NuGet.PackageManagement.UI.UIActionEngine.d__9.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at NuGet.PackageManagement.UI.UIActionEngine.d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at NuGet.PackageManagement.UI.UIActionEngine.d__3.MoveNext()
========== Finished ==========

@heku
Copy link

heku commented Sep 29, 2015

In addition, I just create a clean console application under.NET 4 by VS15 Community on win10 32bit.
Nuget version is 3.2.60914.10516
nuget_issue

@heku
Copy link

heku commented Sep 29, 2015

Attached the error message when I run 'install-package System.Data.SQLite -dependencyversion highestminor' on above console application.

Package Manager Console Host Version 3.2.0.10516

Type 'get-help NuGet' to see all available NuGet commands.

PM> install-package System.Data.SQLite -dependencyversion highestminor
Attempting to gather dependencies information for package 'System.Data.SQLite.1.0.98.1' with respect to project 'NugetTest', targeting '.NETFramework,Version=v4.0'
install-package : An error occurred while retrieving package metadata for 'System.Data.SQLite.1.0.98.1' from source 'nuget.org'.
At line:1 char:1

  • install-package System.Data.SQLite -dependencyversion highestminor
  • - CategoryInfo          : NotSpecified: (:) [Install-Package], Exception
    - FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
    
    

PM>

@heku
Copy link

heku commented Sep 29, 2015

Feel free to ask me for more details if those could help you.

@yishaigalatzer
Copy link

Can you share a fiddler trace? Are you able to make the http calls from another application (fiddler/browser?)

Sent from my Windows Phone


From: Hekumailto:notifications@github.com
Sent: ‎9/‎29/‎2015 7:33 AM
To: NuGet/Homemailto:Home@noreply.github.com
Cc: Yishai Galatzermailto:yigalatz@microsoft.com
Subject: Re: [Home] Cannot install some packages in VS15 Community on Win10 (Both command and GUI) (#1470)

Feel free to ask me for more details if those could help you.


Reply to this email directly or view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3a%2f%2fgithub.com%2fNuGet%2fHome%2fissues%2f1470%23issuecomment-144079010&data=01%7c01%7cyigalatz%40microsoft.com%7cea2c8d219407479ed21e08d2c8daec4b%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=Q2ZyzUKGKOEBP1ETqfserI8a%2b7FJFlFhoDOou75v43Y%3d.

@heku
Copy link

heku commented Sep 30, 2015

OK, will let you know once I come back from my hometown, I`ll have a 7 days holiday since tomorrow.

@heku
Copy link

heku commented Oct 6, 2015

Hi, here is a screenshot regarding Fiddler trace.
nuget_issue

@yishaigalatzer
Copy link

Thanks for getting back with more details.

Its hard to tell what is going on from a screenshot of the trace, but I am seeing a more serious issue:

It looks like EntityFramework is trying to load package installer services and fails. That seems odd, because this is a pretty fundamental service that nuget provides to Visual Studio. I can see the same thing work fine on my machine, so I'm wondering if there is an issue with how your nuget extension is installed, or perhaps an issue with community version of visual studio.

I'm not really sure why it fails on community version, I don't see it failing in any of my projects. Will need to setup a specific repro to look deeper into it.

CC @rowanmiller @divega

Lets deal with this issue, and after we resolve it we can look at your other concern.

@yishaigalatzer yishaigalatzer added this to the 3.3.0-Beta milestone Oct 6, 2015
@yishaigalatzer
Copy link

@zhili1208 can you please investigate this issue? I would suggest going down a few avenues

  1. Open the extension folder (@heku you can try it), and find out if nuget.visualstudio.dll and nuget.visualstudio.implementation.dll are installed (if not please reinstall)
  2. @zhili1208 lets set up a community edition machine and try to follow the repro steps.

@zhili1208
Copy link
Contributor

I set up a win10 32 bit machine with community VS 2014, nuget version 3.2. But can't repro the issue. checked the extension folder, both dlls are installed correctly. I think 'Unable to find type [NuGet.VisualStudio.IVsPackageInstallerServices].' issue looks like a MEF problem there, maybe the vs or nuget extension is installed incorrectly, My suggestion is you can try to recovery the vs or reinstall it to see if you can fix the issue. Another issue reported here is nuget throws on NuGet.Protocol.Core.v3.DependencyInfo.Utils., @heku can you repro this one every time or just one time?

@yishaigalatzer
Copy link

Can we get a listing of the folder structure under extensions?

C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions

If we think the files are missing (or duplicated), this could be the issue

From: Zhi Li [mailto:notifications@github.com]
Sent: Tuesday, October 6, 2015 2:35 PM
To: NuGet/Home Home@noreply.github.com
Cc: Yishai Galatzer yigalatz@microsoft.com
Subject: Re: [Home] Cannot install some packages in VS15 Community on Win10 (Both command and GUI) (#1470)

I set up a win10 32 bit machine with community VS 2014, nuget version 3.2. But can't repro the issue. checked the extension folder, both dlls are installed correctly. I think 'Unable to find type [NuGet.VisualStudio.IVsPackageInstallerServices].' issue looks like a MEF problem there, maybe the vs or nuget extension is installed incorrectly, My suggestion is you can try to recovery the vs or reinstall it to see if you can fix the issue. Another issue reported here is nuget throws on NuGet.Protocol.Core.v3.DependencyInfo.Utils., @hekuhttps://na01.safelinks.protection.outlook.com/?url=https%3a%2f%2fgithub.com%2fheku&data=01%7c01%7cyigalatz%40microsoft.com%7cd45bf017c7454f6e2f3108d2ce95ece4%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=Qoh%2bGDXdTwmCaxXMqmk%2b7cHE1sU%2bwcQbcRre5WyFv1Y%3d can you repro this one every time or just one time?


Reply to this email directly or view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3a%2f%2fgithub.com%2fNuGet%2fHome%2fissues%2f1470%23issuecomment-146008554&data=01%7c01%7cyigalatz%40microsoft.com%7cd45bf017c7454f6e2f3108d2ce95ece4%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=8ebNEj8RXLsK6wZ1%2bpbloT%2bG3UgHG1ezlBGctBm8bOs%3d.

@zhili1208
Copy link
Contributor

dlllist
all nuget dlls under extensions

@yishaigalatzer
Copy link

This was more of a question for @heku , please see if you either are missing dlls or have multiple folders with the same dll showing up twice.

@heku
Copy link

heku commented Oct 7, 2015

image

@heku
Copy link

heku commented Oct 7, 2015

Yes, there were multiple folders contain Nuget.* files under Extensions folder, I`ve cleaned them now.(However the issue is still there)
20151007200816

@heku
Copy link

heku commented Oct 7, 2015

The NuGet.Protocol.Core.v3.DependencyInfo.Utils issue doesn`t repro now, but another NuGet.Protocol.Core.v3... issue is coming.


Attempting to gather dependencies information for package 'System.Data.SQLite.1.0.98.1' with respect to project 'NugetTest', targeting '.NETFramework,Version=v4.0'
Attempting to resolve dependencies for package 'System.Data.SQLite.1.0.98.1' with DependencyBehavior 'HighestMinor'
Resolving actions to install package 'System.Data.SQLite.1.0.98.1'
Resolved actions to install package 'System.Data.SQLite.1.0.98.1'
Adding package 'EntityFramework.6.1.3' to folder 'C:\Codes\NugetTest\packages'
Added package 'EntityFramework.6.1.3' to folder 'C:\Codes\NugetTest\packages'
Added package 'EntityFramework.6.1.3' to 'packages.config'
Executing script file 'C:\Codes\NugetTest\packages\EntityFramework.6.1.3\tools\init.ps1'...
Executing script file 'C:\Codes\NugetTest\packages\EntityFramework.6.1.3\tools\install.ps1'...
Unable to find type [NuGet.VisualStudio.IVsPackageInstallerServices].
At C:\Codes\NugetTest\packages\EntityFramework.6.1.3\tools\EntityFramework.psm1:1004 char:5

  • $packageInstallerServices = $componentModel.GetService([NuGet.Vis ...
    
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (NuGet.VisualStu...stallerServices:TypeName) [], RuntimeException
    • FullyQualifiedErrorId : TypeNotFound

You cannot call a method on a null-valued expression.
At C:\Codes\NugetTest\packages\EntityFramework.6.1.3\tools\EntityFramework.psm1:1006 char:5

  • $vsPackage = $packageInstallerServices.GetInstalledPackages() | ? ...
    
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : InvokeMethodOnNull

Join-Path : Cannot bind argument to parameter 'Path' because it is null.
At C:\Codes\NugetTest\packages\EntityFramework.6.1.3\tools\EntityFramework.psm1:740 char:28

  • $toolsPath = Join-Path $installPath tools
    
  •                        ~~~~~~~~~~~~
    
    • CategoryInfo : InvalidData: (:) [Join-Path], ParameterBindingValidationException
    • FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.JoinPathCom
      mand

Join-Path : Cannot bind argument to parameter 'Path' because it is null.
At C:\Codes\NugetTest\packages\EntityFramework.6.1.3\tools\EntityFramework.psm1:780 char:74

  • ... [System.Reflection.Assembly]::LoadFrom((Join-Path $ToolsPath EntityF ...
  •                                                    ~~~~~~~~~~
    
    • CategoryInfo : InvalidData: (:) [Join-Path], ParameterBindingValidationException
    • FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.JoinPathCom
      mand

You cannot call a method on a null-valued expression.
At C:\Codes\NugetTest\packages\EntityFramework.6.1.3\tools\EntityFramework.psm1:781 char:5

  • $dispatcher = $utilityAssembly.CreateInstance(
    
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : InvokeMethodOnNull

Join-Path : Cannot bind argument to parameter 'Path' because it is null.
At C:\Codes\NugetTest\packages\EntityFramework.6.1.3\tools\EntityFramework.psm1:810 char:20

  •     (Join-Path $runner.ToolsPath EntityFramework.PowerShell.dll),
    
  •                ~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidData: (:) [Join-Path], ParameterBindingValidationException
    • FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.JoinPathCom
      mand

Unable to find type [NuGet.VisualStudio.IVsPackageInstallerServices].
At C:\Codes\NugetTest\packages\EntityFramework.6.1.3\tools\EntityFramework.psm1:1004 char:5

  • $packageInstallerServices = $componentModel.GetService([NuGet.Vis ...
    
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (NuGet.VisualStu...stallerServices:TypeName) [], RuntimeException
    • FullyQualifiedErrorId : TypeNotFound

You cannot call a method on a null-valued expression.
At C:\Codes\NugetTest\packages\EntityFramework.6.1.3\tools\EntityFramework.psm1:1006 char:5

  • $vsPackage = $packageInstallerServices.GetInstalledPackages() | ? ...
    
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : InvokeMethodOnNull

Join-Path : Cannot bind argument to parameter 'Path' because it is null.
At C:\Codes\NugetTest\packages\EntityFramework.6.1.3\tools\EntityFramework.psm1:740 char:28

  • $toolsPath = Join-Path $installPath tools
    
  •                        ~~~~~~~~~~~~
    
    • CategoryInfo : InvalidData: (:) [Join-Path], ParameterBindingValidationException
    • FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.JoinPathCom
      mand

Join-Path : Cannot bind argument to parameter 'Path' because it is null.
At C:\Codes\NugetTest\packages\EntityFramework.6.1.3\tools\EntityFramework.psm1:780 char:74

  • ... [System.Reflection.Assembly]::LoadFrom((Join-Path $ToolsPath EntityF ...
  •                                                    ~~~~~~~~~~
    
    • CategoryInfo : InvalidData: (:) [Join-Path], ParameterBindingValidationException
    • FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.JoinPathCom
      mand

You cannot call a method on a null-valued expression.
At C:\Codes\NugetTest\packages\EntityFramework.6.1.3\tools\EntityFramework.psm1:781 char:5

  • $dispatcher = $utilityAssembly.CreateInstance(
    
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : InvokeMethodOnNull

Join-Path : Cannot bind argument to parameter 'Path' because it is null.
At C:\Codes\NugetTest\packages\EntityFramework.6.1.3\tools\EntityFramework.psm1:810 char:20

  •     (Join-Path $runner.ToolsPath EntityFramework.PowerShell.dll),
    
  •                ~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidData: (:) [Join-Path], ParameterBindingValidationException
    • FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.JoinPathCom
      mand

Type 'get-help EntityFramework' to see all available Entity Framework commands.
Successfully installed 'EntityFramework 6.1.3' to NugetTest
Install failed. Rolling back...
Package 'System.Data.SQLite.Core 1.0.98.1' does not exist in project 'NugetTest'
Removed package 'EntityFramework 6.1.3' from 'packages.config'
Package 'System.Data.SQLite.Core 1.0.98.1' does not exist in folder 'C:\Codes\NugetTest\packages'
Removing package 'EntityFramework 6.1.3' from folder 'C:\Codes\NugetTest\packages'
Removed package 'EntityFramework 6.1.3' from folder 'C:\Codes\NugetTest\packages'
System.NullReferenceException: Object reference not set to an instance of an object.
at NuGet.Protocol.Core.v3.GlobalPackagesFolderUtility.d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at NuGet.Protocol.Core.v3.DownloadResourceV3.d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at NuGet.PackageManagement.PackageDownloader.d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
at NuGet.PackageManagement.NuGetPackageManager.d__42.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at NuGet.PackageManagement.NuGetPackageManager.d__42.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at NuGet.PackageManagement.UI.UIActionEngine.d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at NuGet.PackageManagement.UI.UIActionEngine.d__3.MoveNext()
========== Finished ==========

@zhili1208
Copy link
Contributor

@heku since I can't repro your issue, I have no idea why it fails. Can you repair your vs? it might fix the issue

@yishaigalatzer
Copy link

You probably want to have a clean uninstall and reinstall

@heku
Copy link

heku commented Oct 9, 2015

Well, I`ll have a try, thank you all the same.

@heku
Copy link

heku commented Oct 10, 2015

Hi, last night I re-installed a clean OS (windows 10 pro 32 English) and installed VS2015 community (English) and updated Nuget to the latest version. then try to install EntityFramework and System.Data.SQLite, the SQLite can install successfully but the EntityFramework still have the issue.

At C:\Codes\NugetTest\packages\EntityFramework.6.1.3\tools\EntityFramework.psm1:1004 char:5

$packageInstallerServices = $componentModel.GetService([NuGet.Vis ...

CategoryInfo : InvalidOperation: (NuGet.VisualStu...stallerServices:TypeName) [], RuntimeException
FullyQualifiedErrorId : TypeNotFound
You cannot call a method on a null-valued expression.
At C:\Codes\NugetTest\packages\EntityFramework.6.1.3\tools\EntityFramework.psm1:1006 char:5

$vsPackage = $packageInstallerServices.GetInstalledPackages() | ? ...

CategoryInfo : InvalidOperation: (:) [], RuntimeException
FullyQualifiedErrorId : InvokeMethodOnNull
Join-Path : Cannot bind argument to parameter 'Path' because it is null.
At C:\Codes\NugetTest\packages\EntityFramework.6.1.3\tools\EntityFramework.psm1:740 char:28

$toolsPath = Join-Path $installPath tools

CategoryInfo : InvalidData: (:) [Join-Path], ParameterBindingValidationException
FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.JoinPathCom mand
Join-Path : Cannot bind argument to parameter 'Path' because it is null.

@zhili1208
Copy link
Contributor

It's still same issue. where do you download VS community version and can you provide the link?

@csabar
Copy link

csabar commented Oct 15, 2015

I have similar problem, but with Visual Studio Express 2015 for Windows Desktop. OS is Windows 10 x64. Interesting is that yesterday it worked after downgrade of Entity Framework, but today the same issue... The express edition (and also the community version) is available here: https://www.visualstudio.com/products/mt238358

@zhili1208
Copy link
Contributor

it looks like everyone hit this when they install entityframework, you just said "downgrade of entityfremwork", what's the version of entityframework you installed and what's the version you downgrade to? thanks

@zhili1208
Copy link
Contributor

BTW, can you help me check this? Open your NuGet Packager Console, type " $test = Get-VSComponentModel", and check $test is not null, then type "$test1 = $test.GetService([NuGet.VisualStudio.IVsPackageInstallerServices])", then check $test2, it should be NuGet.VisualStudio.VsPackageInstallerServices

@zhili1208
Copy link
Contributor

@csabar Please first uninstall NuGet 3.0 and reinstall 3.2

@zhili1208
Copy link
Contributor

I tired windows desktop express, it repro with 3.0 but when I uninstall and reinstall it, both 3.0 and 3.2 works well

@csabar
Copy link

csabar commented Oct 16, 2015

I tried different versions of entity framework, but only downgrade from 6.1.3 to 6.1.2 helped. And it worked just for one day... I tried reinstalling the NuGet few days ago. Now I have version 3.2.60914.10516. I'm not sure what you mean by reinstalling both 3.0 and 3.2. I think I have just the 3.2 version

image

Here is the result of your commands:

Each package is licensed to you by its owner. Microsoft is not responsible for, nor does it grant any licenses to, third-party packages. Some packages may include dependencies which are governed by additional licenses. Follow the package source (feed) URL to determine any dependencies.

Package Manager Console Host Version 3.2.0.10516

Type 'get-help NuGet' to see all available NuGet commands.

PM> $test = Get-VSComponentModel
PM> $test

DefaultCatalog DefaultExportProvider                                                DefaultCompositionService                                          
-------------- ---------------------                                                -------------------------                                          
               Microsoft.VisualStudio.Composition.NetFxAdapters+MefV1ExportProvider Microsoft.VisualStudio.Composition.NetFxAdapters+CompositionService


PM> $test1 = $test.GetService([NuGet.VisualStudio.IVsPackageInstallerServices])
Unable to find type [NuGet.VisualStudio.IVsPackageInstallerServices].
At line:1 char:1
+ $test1 = $test.GetService([NuGet.VisualStudio.IVsPackageInstallerServ ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (NuGet.VisualStu...stallerServices:TypeName) [], RuntimeException
    + FullyQualifiedErrorId : TypeNotFound

PM> 

@zhili1208
Copy link
Contributor

looks like it's not related to entityframework and nuget verison(3.0 or 3.2), just for some reason, VS MEF didn't import the NuGet API type. I can't repro this now and trying to get repro first.

@yishaigalatzer
Copy link

Zhi – I agree with your assessment, in this world you can’t create new templates that require nuget, so things like file->new->mvc project should create an unbuildable project.

Let’s verify that is the case with the user

From: Zhi Li [mailto:notifications@github.com]
Sent: Sunday, October 18, 2015 8:40 PM
To: NuGet/Home Home@noreply.github.com
Cc: Yishai Galatzer yigalatz@microsoft.com
Subject: Re: [Home] Cannot install some packages in VS15 Community on Win10 (Both command and GUI) (#1470)

looks like it's not related to entityframework and nuget verison(3.0 or 3.2), just for some reason, VS MEF didn't import the NuGet API type. I can't repro this now and trying to get repro first.


Reply to this email directly or view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3a%2f%2fgithub.com%2fNuGet%2fHome%2fissues%2f1470%23issuecomment-149088601&data=01%7c01%7cyigalatz%40microsoft.com%7c195e40be1d3845725eac08d2d836f092%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=m%2bHN6QmKol9j86R7VAspM6sAaZBVTm0rJb8dACREFy0%3d.

@zhili1208
Copy link
Contributor

@csabar can you try this? file->new->mvc project. thanks

@csabar
Copy link

csabar commented Oct 19, 2015

I tried File -> New Project... and there between the installed there is no item like MVC Project.

image

There is no such a project even between the Online items. Am I doing something wrong?

image

If I understand correctly the MVC should be under the Web category, but this is Visual Studio Express, which I use just for WPF projects and not web projects. Is it possible to test with other type of project which should be there in Express Edition?

@zhili1208
Copy link
Contributor

No, it's not possible, sorry, I just forgot there is no mvc in desktop express edition, but anyway, I think mvc will not work in this case because I just found VS didn't load the Interface dll into memory. you can try to uninstall nuget and delete mef cache then reinstall NuGet extension. It's at %AppData%\Local\Microsoft\WDExpress\14.0\ComponentModelCache\Microsoft.VisualStudio.Default.cache. it might work, at least it works for me.

@csabar
Copy link

csabar commented Oct 20, 2015

Thank you, deleting the cache file helped.

Each package is licensed to you by its owner. Microsoft is not responsible for, nor does it grant any licenses to, third-party packages. Some packages may include dependencies which are governed by additional licenses. Follow the package source (feed) URL to determine any dependencies.

Package Manager Console Host Version 3.2.0.10516

Type 'get-help NuGet' to see all available NuGet commands.

PM> $test = Get-VSComponentModel
PM> $test1 = $test.GetService([NuGet.VisualStudio.IVsPackageInstallerServices])
PM> $test1
NuGet.VisualStudio.VsPackageInstallerServices
PM> 

If you need the wrong cache file for reproducing I can send it by mail.

@heku
Copy link

heku commented Oct 20, 2015

Thx all, I tried above solution as well. But I found that it just works before I close the VS. when I re-open the VS, the issue repro again...

@yishaigalatzer
Copy link

Can you share the mef cache? Also please share the ActivityLog.xml file

@zhili1208
Copy link
Contributor

just did some test, I think when you deleted your mef cache, VS scanned all mef component and loaded all correct mef dlls into memory but generate wrong mef cache file on disk, so it was working before you closed VS. then you re-opened VS, Vs read wrong mef cache file, issue repro again.

@csabar
Copy link

csabar commented Oct 27, 2015

I can confirm that it works just temporarily. I can't upload the files here, because the file type is not supported, but I found that the last entry in the ActivityLog.xml is an error log about NuGet.

System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: span
   at Microsoft.VisualStudio.Text.SnapshotSpan..ctor(ITextSnapshot snapshot, Span span)
   at NuGetConsole.Implementation.Console.WpfConsoleClassifier.GetClassificationSpans(SnapshotSpan span)
   at Microsoft.VisualStudio.Text.Classification.Implementation.ClassifierTagger.<GetTags>d__5.MoveNext()
   at Microsoft.VisualStudio.Text.Tagging.Implementation.TagAggregator`1.<GetTagsForBuffer>d__38.MoveNext()

The date of the error is 2015/10/13, which is probably date when I started to use migrations in entity framework. And I think for the first time it worked and I was able to create the default migration. I think that the problem started to happen after restart of visual studio (if I remember correctly).

@yishaigalatzer
Copy link

How can you tell the error is about nuget? The text doesn't show that, is there more text above it?

The callstack looks like a bug in an editor, which nuget does not ship.

Could you please share more information?


From: csabarmailto:notifications@github.com
Sent: ‎10/‎27/‎2015 5:34 AM
To: NuGet/Homemailto:Home@noreply.github.com
Cc: Yishai Galatzermailto:yigalatz@microsoft.com
Subject: Re: [Home] Cannot install some packages in VS15 Community on Win10 (Both command and GUI) (#1470)

I can confirm that it works just temporarily. I can't upload the files here, because the file type is not supported, but I found that the last entry in the ActivityLog.xml is an error log about NuGet.

System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: span
at Microsoft.VisualStudio.Text.SnapshotSpan..ctor(ITextSnapshot snapshot, Span span)
at NuGetConsole.Implementation.Console.WpfConsoleClassifier.GetClassificationSpans(SnapshotSpan span)
at Microsoft.VisualStudio.Text.Classification.Implementation.ClassifierTagger.d__5.MoveNext()
at Microsoft.VisualStudio.Text.Tagging.Implementation.TagAggregator`1.d__38.MoveNext()

The date of the error is 2015/10/13, which is probably date when I started to use migrations in entity framework. And I think for the first time it worked and I was able to create the default migration. I think that the problem started to happen after restart of visual studio (if I remember correctly).


Reply to this email directly or view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3a%2f%2fgithub.com%2fNuGet%2fHome%2fissues%2f1470%23issuecomment-151477683&data=01%7c01%7cyigalatz%40microsoft.com%7ce8d97de635f74bb7d50f08d2decaffab%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=4WPxqfcLmVfLjqXdAXIr6H87lCBvtQ44HWbwSYgQb7Q%3d.

@yishaigalatzer
Copy link

Sorry, I just realized this is NuGet (reminder to self, stop reviewing callstacks right out of bed :) ).

Will take a look shortly

@yishaigalatzer
Copy link

I believe this was fixed today, when #555 was fixed.

If this repros after 3.3 is released we should open a fresh bug, and take another look.

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

No branches or pull requests

6 participants