Deployment errors – cannot find specified assembly

Today I opened up a branch of code in TFS for the first time in a week to find this error.



This is an error i have seen in the past. From what i can understand the old .dll file is being used by some unknown process. SharePoint sometimes gets “stuck” on different files, and this is one of them. Since some process has the file opened Visual Studio cannot overwrite it, and the error is a result. Here is how I fixed the issue.

  1. Open up a windows explorer and navigate to C:\windows\assemblies.
  2. Find the ProjectName.dll file which is causing the error and delete this from the folder.
  3. Restart the machine.
  4. Rebuild the project and deploy.

This time I got a second error after I fixed the .dll error:

 An error occurred in deployment step ‘Retract Solution’: The language-neutral solution package was not found

This error was new to me, so I did a quick search online and found this article:

The solution is to open up SharePoint Management shell and run the command “(get-spsolution mysolution.wsp).Delete()”. This should take care of the error and you should be able to redeploy it.


(Views: 214)

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload the CAPTCHA.