I got below error while running Enable-Migrations on my ASP.NET MVC5 project (Powershell v5 & Visual Studio 2015). I have tried to uninstall and re-install EntityFramework (v6.1.3) but no lucky.
Does anyone know how to solve it?
Type name 'Microsoft.VisualStudio.Shell.Package' is ambiguous, it could be 'Microsoft.VisualStudio.Shell.Package, Microsoft.VisualStudio.Shell.14.0, Version=14.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a' or 'Microsoft.VisualStudio.Shell.Package, Microsoft.VisualStudio.Shell.11.0, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
At C:PROGRAM FILES (X86)MICROSOFT VISUAL STUDIO 14.0COMMON7IDEEXTENSIONSMSHGPU2S.W4IModulesNuGetprofile.ps1:126 char:5
+ $service = [Microsoft.VisualStudio.Shell.Package]::GetGlobalServi ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [], RuntimeException
+ FullyQualifiedErrorId : AmbiguousTypeReference
Type name 'NuGet.VisualStudio.IVsPackageInstallerServices' is ambiguous, it could be 'NuGet.VisualStudio.IVsPackageInstallerServices, Microsoft.VisualStudio.ApplicationInsights, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a' or 'NuGet.VisualStudio.IVsPackageInstallerServices, Microsoft.VisualStudio.Web.Application, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
At D:xxxpackagesEntityFramework.6.1.3oolsEntityFramework.psm1:1004 char:5
+ $packageInstallerServices = $componentModel.GetService([NuGet.Vis ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [], RuntimeException
+ FullyQualifiedErrorId : AmbiguousTypeReference
You cannot call a method on a null-valued expression.
At D:xxxpackagesEntityFramework.6.1.3oolsEntityFramework.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:xxxpackagesEntityFramework.6.1.3oolsEntityFramework.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:xxxpackagesEntityFramework.6.1.3oolsEntityFramework.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:xxxpackagesEntityFramework.6.1.3oolsEntityFramework.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:xxxpackagesEntityFramework.6.1.3oolsEntityFramework.psm1:810 char:20
+ (Join-Path $runner.ToolsPath EntityFramework.PowerShell.dll),
+ ~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidData: (:) [Join-Path], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.JoinPathCommand