Could not load file or assembly


FatalError: Could not load file or assembly ‘KWizCom.Foundation, Version=, Culture=neutral, PublicKeyToken=30fb4ddbec95ff8f’ or one of its dependencies. The system cannot find the file specified.
Debug:    at KWizCom.SharePoint.FieldControls.DualLookupType.FieldSettings.GetFieldSettings(String fieldSettings)
at KWizCom.SharePoint.FieldControls.DualLookupType.DualLookupField.OnUpdated()


During content deployment.


The above error happens when a content database still uses an older version (eg of Kwizcom.Foundation, but the installed assemblies in your GAC are of later versions ( .Net provides a cool dependentAssembly redirect feature, using which any older version of dll’s can automatically be redirected to use a newer version. This happens during the import phase and not during the export phase. So you have to check the target server content deployment import logs to verify the error.

During KwizCom upgrade or installation, the web.config, it automatically updates the dependent assembly redirection. But this will not help for Content Deployment. Because the web.config redirections are used by w3wp processes, while content deployment is run by a timer job, which is a Windows Service called “SharePoint 2010 Timer” and runs the file $hive14/bin/owstimer.exe which uses its own config file owstimer.exe.config.


When I inspected the bin directory, the owstimer.exe.config file was already there and Kwizcom had created one with the following content:

<?xml version=”1.0″ encoding=”utf-8″?>
<assemblyBinding xmlns=”urn:schemas-microsoft-com:asm.v1″>
<dependentAssembly xmlns=””>
<assemblyIdentity name=”KWizCom.SharePoint.Foundation” publicKeyToken=”30fb4ddbec95ff8f” culture=”neutral” />
<bindingRedirect oldVersion=”″ newVersion=”″ />
<dependentAssembly xmlns=””>
<assemblyIdentity name=”KWizCom.Foundation” publicKeyToken=”30fb4ddbec95ff8f” culture=”neutral” />
<bindingRedirect oldVersion=”″ newVersion=”″ />

Just in case, I restarted the timer service, but I was still getting the error, inspite of the above configuration. Now I turned to the next possible solution: google.

Shai Petel has written a blog about how to fix this via a wsp solution. While it is a good solution to keep that in wsp, in our case, I could not afford to change the wsp as the problem was happening in production. I noticed in Mr. Petel ‘s blog where the code replaces xmlns=”” with empty string. So I just went ahead and removed the xmlns=”” string in the above config and restarted the timer service.

Now the content deployment worked fine. The advantage is no need to restart website, so there is no downtime. The disadvantage is this has to be done in every WFE server of the farm.

This problem is probably only until the version of In the current version ( the xmlns=”” issue is fixed (I have not verified it though).


3 Responses to Could not load file or assembly

  1. Sameer Shah says:

    I had a very similar problem with Kwiz foundation. The solution suggested here did not work for me. Atlast my senior suggested that I should download the the old version (the one which shows up in logs) and then try. That worked.


    • vasya10 says:

      @sameer Which version did not work? I remember reading from Shai Petel’s blog that it was fixed in a later version…


  2. Sameer Shah says:

    Well, actually he suggested, we extract the dll’s from old version wsp and load them into GAC so that the new and the old versions can run side by side.


Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: