Do you sometimes get an ‘Access is Denied’ message when deploying a custom web part from Visual Studio, to SharePoint ?
If so, you can resolve this by stopping and restarting the Indexing service.
1. Go to a command prompt.
2. Type ‘net stop cisvc’
3. Type ‘net start cisvc’
4. Try deploying your project again.