I’m building a web part in SharePoint 2010, and I need to use the TaxonomyFieldControl for filtering. I have set the reference in the project (the one that isnt ‘intl’, v14.0.0.0), but I get a warning: “Element ‘TaxonomyFieldControl’ is not a known element. This can occur if there is a compilation error in the Web site, or the web.config file is missing.” at compilation, and at runtime I get “Unknown server tag ‘Taxonomy:TaxonomyFieldControl'”
<%@ Assembly Name="$SharePoint.Project.AssemblyFullName$" %>
<%@ Assembly Name="Microsoft.Web.CommandUI, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register TagPrefix="Taxonomy" Namespace="Microsoft.SharePoint.Taxonomy" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="asp" Namespace="System.Web.UI" Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" %>
<%@ Import Namespace="Microsoft.SharePoint" %>
<%@ Register Tagprefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="WebPart_DocumentsUserControl.ascx.cs" Inherits="Test.WebPart_Documents.WebPart_DocumentsUserControl" %>
...
<Taxonomy:TaxonomyFieldControl FieldName="TaxonomyFilter" runat="server"></Taxonomy:TaxonomyFieldControl>
it is also worth noting that “Taxonomy” does not appear with Intellisense, and neither does “Utilities”, but the rest do. Also in the code-behind, i have:
using Microsoft.SharePoint.Taxonomy;
and it compiles fine.
I have tried deleting my schema cache per http://blog.tentaclesoftware.com/archive/2010/07/21/95.aspx
Thank you!
You’re registering the wrong assembly. Instead of:
Try: