Error occurred in deployment step ‘Add Solution’: Failed to load receiver assembly

Yesterday, I encountered a unique problem in my environment. While I was deploying my solution, I encountered the above error on visual studio. Below are the steps that I did but could not resolved the issue:

  1. Timer service restart x3
  2. IISreset x 10
  3. Process explorer handle search x 1
  4. Ensuring sure the assembly\GAC_MSIL and assembly\temp folders are free of the binary by changing the version number according to one of my stackoverflow findings (TEDIOUS and do not work)
  5. Manually cleared the obj and binary directories (work for the first time only)

So I panicked and was about to give up by mapping a new project from TFS and deleting this problematic one when i saw this article.

So in this article, the author has also faced a similar problem as me and advised to change the strong name key file. So I googled on how to change the strong name key file as I have never change before, so this is how it can be done.

  1. Go to the project, press F4 and it will lead you to the project properties page
  2. In the properties page, select the signing tab
  3. Look out for the “Choose a strong name key file’ section and select New.
  4. Enter a new strong key name
  5. Do not choose password (TEDIOUS if you are the forgetful type) then press saved

Thank you very much to the open source community

Like what you read? Give Zi Kai Toh a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.