File not found Exception while Export

Oct 25, 2013 at 10:09 AM

I installed and activated the feature on a SharePoint 2010 Foundation Server. When I try to export a list I get a "File not found" Exception.

In the log i found that the Microsoft.SharePoint.Taxonomy.dll or one of it's dependencies was not found.
I don't know anymore if Taxonomy.dll exists or not, but i copied it from a Standard Server into the ISAPI folder and into the Windows/Assembly folder to register it in the GAC - but the error reappeared.

Any suggestions appreciated

In the folloging the error message:
System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.SharePoint.Taxonomy, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. The system cannot find the file specified. at NY.ExportVersionHistory.Layouts.NY.ExportVersionHistory.ExportVersionHistory.GetFieldValue(SPField field, SPListItemVersion version) at NY.ExportVersionHistory.Layouts.NY.ExportVersionHistory.ExportVersionHistory.ExportHistory(String[] items, String listID) at NY.ExportVersionHistory.Layouts.NY.ExportVersionHistory.ExportVersionHistory.Page_Load(Object sender, EventArgs e) at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object se... 6b54e4b2-9cbe-4407-808e-36ea15571f78
10/25/2013 10:20:43.27* w3wp.exe (0x1BE4) 0x0BC4 SharePoint Foundation Runtime tkau Unexpected ...nder, EventArgs e) at System.Web.UI.Control.OnLoad(EventArgs e) at Microsoft.SharePoint.WebControls.UnsecuredLayoutsPageBase.OnLoad(EventArgs e) at Microsoft.SharePoint.WebControls.LayoutsPageBase.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) 6b54e4b2-9cbe-4407-808e-36ea15571f78
Oct 25, 2013 at 2:59 PM
Edited Oct 25, 2013 at 3:01 PM

You will need to perform following steps in order for Export to work in SharePoint Foundation 2010:
  1. Download the latest code from Source code section.
  2. Open the solution in Visual Studio 2010. Remove the reference of Microsoft.SharePoint.Taxonomy.dll
  3. Remove the following Code lines from ExportVersionHistory.aspx.cs file present inside Layouts folder:
using Microsoft.SharePoint.Taxonomy;

case SPFieldType.Invalid:
if (field.TypeAsString.Equals("TaxonomyFieldType") || field.TypeAsString.Equals("TaxonomyFieldTypeMulti"))
    TaxonomyField taxonomyField = field as TaxonomyField;
    fieldValue = taxonomyField.GetFieldValueAsText(version[field.StaticName]);
    fieldValue = version[field.StaticName].ToString();
Finally build the solution and create a WSP file to be deployed.