Sunday, May 17, 2015

Could not load file or assembly ‘$SharePoint.Project.AssemblyFullName$’ or one of its dependencies. The system cannot find the file specified.

There are lot of scenarios where you can face this issue. I will explain scenario which i faced.

Scenario

I have all the solution deployed and running already on the production server. My task was to just change an html link in the .ascx control. I changed the control and rather than deploying whole solution, i copied .ascx control and put it in the 14 hive control templates. I restarted IIS and refreshed page, i found following exception,

Could not load file or assembly ‘$SharePoint.Project.AssemblyFullName$’ or one of its dependencies. The system cannot find the file specified.


Solution

Luckily error was pointing towards the new custom control that i deployed. I opened file and searched for "$SharePoint.Project.AssemblyFullName$". Replace this string with the actual assembly name, version and culture (If you deploy with visual studio, it changes it automatically but as it was manual deployment, i needed to copy control's assembly and replace with the "$SharePoint.Project.AssemblyFullName$"). Restart IIS and problem was solved.

No comments:

Post a Comment