本文介绍了无法找到类型[NuGet.VisualStudio.IVsPackageInstallerServices]。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在Manager Console中编写启用迁移时,请帮助我

please help me

(在VS 2015 .net4.6 EF6中) .2)发生此错误。

when I write Enable-Migration in Manager Console (in VS 2015 .net4.6 EF6.2) this Error has happened.

为什么?

无法找到类型[NuGet.VisualStudio.IVsPackageInstallerServices]。

在D:\Programming\AspMVC \files_and_codes \Files and Codes \Projects\q\EF_CodeFirst \packages \ EntityFramework.6.1.3 \ tools \ EntityFramework.psm1:1004

  char:60

+ ... entModel.GetService([NuGet.VisualStudio.IVsPackageInstallerServices])

+                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          :InvalidOperation:(NuGet.VisualStu ... stallerServices:TypeName)[],RuntimeException

    + FullyQualifiedErrorId:TypeNotFound



您无法在空值表达式上调用方法。

在D:\Programming\AspMVC \\ \\ files_and_codes \Files and Codes \Projects\q\EF_CodeFirst\packages\ EntityFramework.6.1.3\tools\EntityFramework.psm1:1006

  char:5

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

    + FullyQualifiedErrorId:InvokeMethodOnNull



Join-Path:无法将参数绑定到参数'Path',因为它为null。

在D:\ Programming\AspMVC\files_and_codes \Files and Codes\Projects\q\EF_CodeFirst\packages\ EntityFramework.6.1.3\tools\ EntityFramework.psm1:713 

char:28

+      $ toolsPath = Join-Path $ installPath工具

+                            ~~~~~~~~~~~~

    + CategoryInfo          :InvalidData :( :) [Join-Path],ParameterBindingValidationException

    + FullyQualifiedErrorId:ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.JoinPathCommand



Join-Path:无法将参数绑定到参数'Path',因为它为null。

在D:\Programming\AspMVC \ files_and_codes \Files and Codes \Projects\q\EF_CodeFirst\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



你不能在空值表达式上调用方法。

在D:\Programming \ AspMVC \files_and_codes \Files and Codes \Projects\q\EF_CodeFirst\packages\ EntityFramework.6.1.3\tools\ EntityFramework.psm1:781 

char:5

+    $ dispatcher = $ utilityAssembly.CreateInstance(

+    ~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          :InvalidOperation :( :) [],RuntimeException

    + FullyQualifiedErrorId:InvokeMethodOnNull



Join-Path:无法将参数绑定到参数'Path',因为它为null。

在D:\ Programming\AspMVC\files_and_codes\Files and Codes\Projects\q\EF_CodeFirst\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 D:\Programming\AspMVC\files_and_codes\Files and Codes\Projects\q\EF_CodeFirst\packages\EntityFramework.6.1.3\tools\EntityFramework.psm1:1004
 char:60
+ ... entModel.GetService([NuGet.VisualStudio.IVsPackageInstallerServices])
+                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (NuGet.VisualStu...stallerServices:TypeName) [], RuntimeException
    + FullyQualifiedErrorId : TypeNotFound

You cannot call a method on a null-valued expression.
At D:\Programming\AspMVC\files_and_codes\Files and Codes\Projects\q\EF_CodeFirst\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 D:\Programming\AspMVC\files_and_codes\Files and Codes\Projects\q\EF_CodeFirst\packages\EntityFramework.6.1.3\tools\EntityFramework.psm1:713 
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 D:\Programming\AspMVC\files_and_codes\Files and Codes\Projects\q\EF_CodeFirst\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 D:\Programming\AspMVC\files_and_codes\Files and Codes\Projects\q\EF_CodeFirst\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 D:\Programming\AspMVC\files_and_codes\Files and Codes\Projects\q\EF_CodeFirst\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

推荐答案

这个问题与Visual Studio有关,我建议你在Visual Studio论坛中打开一个案例 https://social.msdn.microsoft.com/Forums/vstudio/en-US/home?category=visualstudio

This problem is more related to Visual Studio, I suggest you opening a case in Visual Studio forum at https://social.msdn.microsoft.com/Forums/vstudio/en-US/home?category=visualstudio

最好的问候,

Teige


这篇关于无法找到类型[NuGet.VisualStudio.IVsPackageInstallerServices]。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-29 23:06