Failed to import IDeployService. Cannot proceed with xap deployment. This failure can be observed if the component model ...

Failed to import IDeployService. Cannot proceed with xap deployment. This failure can be observed if the component model cache (typically located in %LocalAppData%\Microsoft\VisualStudio\[version]\ComponentModelCache) is not up-to-date.  To come out of this error, close all instances of visual studio, delete the component model cache folder and try again.