Visual Studio component cache is deprecated

Almost every time I try to run the update-database command to migrate EF, the following error appears in Visual Studio 2015:

Calling an exception "GetService" with argument "1": "Exception calling" Invoke "with argument" 2 ":" The Visual Studio cache component is deprecated. Restart Visual Studio. Visual Studio component cache is out of date. Restart Visual Studio. "D: \ Dev \ Project \ packages \ EntityFramework.6.1.3 \ tools \ EntityFramework.psm1: 1004 char: 5 + $ packageInstallerServices = $ componentModel.GetService ([NuGet.Vis ... + ~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~ + CategoryInfo: NotSpecified: (:) [], MethodInvocationException + FullyQualifiedErrorId: ScriptMethodRuntimeException You cannot call a method with a null value. In D: \ Dev \ Project \ packages \ EntityFramework.6.1.3 \ tools \ EntityFramework.psm1: 1006 char: 5 + $ vsPackage = $ packageInstallerServices.GetInstalledPackages () |? ... + ~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ CategoryInfo: InvalidOperation: (:) [] , RuntimeException + FullyQualifiedErrorId: InvokeMethodOnNull Join-Path: Unable to bind the argument to the Path parameter because it is zero. In D: \ Dev \ Project \ Packages \ Ent ityFramework.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: It is not possible to bind the argument to the 'Path' parameter because it is zero. In D: \ Dev \ Project \ 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 D with no value. : \ Dev \ Project \ Packages \ EntityFramework.6.1.3 \ Tools \ EntityFramework.psm1: 781 char: 5 + $ dispatcher = $ utilityAssembly.CreateInstance (+ ~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo: InvalidOperation: (:) [], RuntimeException + FullyQualifiedErrorId: InvokeMethodOnNull Join-Path: It is not possible to associate the argument with the Path parameter because it is equal to 0. In D: \ Dev \ Project \ 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

  • In most cases, restarting Visual Studio 2015 fixes this, but sometimes I have to clear the component cache manually by deleting all elements from C: \ Users {UserName} \ AppData \ Local \ Microsoft \ VisualStudio \ 14.0 \ ComponentModelCache

  • I am running VS2015 as an administrator.

+3
source share
2 answers

You have to go to

%APPDATA%\Local\Microsoft\Visual Studio\<version> 

and delete the ComponentModelChache directory.

+11
source

I was getting this error when trying to select records in my SQL server management studio:

Error: "The Visual Studio component cache is out of date. Restart Visual Studio (Microsoft.VisualStudio.ExtensibilityHosting)"

I restarted Visual Studio but got the same error.

Solution: I went to this place: "C: \ Users \ username \ AppData \ Local \ Microsoft \ VisualStudio \ 14.0 \ ComponentModelCache"

And deleted all the files inside this folder and restarted the VS and SQL server. IT WORKS!

+2
source

All Articles