Wednesday, April 15, 2009

AxLabel issues in Visual Studio

Getting build errors in Visual Studio when you try to use AxLabels in your markup? You are probably missing the AxLabel expression type in your web.config. Modify your web.config to include the expressions as below. They are in the <system.web><compilation> node. The following was copied from the web.config of the root EP virtual directory:

<expressionBuilders>
<remove expressionPrefix="Resources" />
<add expressionPrefix="Resources" type="Microsoft.SharePoint.SPResourceExpressionBuilder, Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />
<add expressionPrefix="SPHtmlEncodedResources" type="Microsoft.SharePoint.SPHtmlEncodedResourceExpressionBuilder, Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />
<add expressionPrefix="SPSimpleFormattingEncodedResources" type="Microsoft.SharePoint.SPSimpleFormattingEncodedResourceExpressionBuilder, Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />
<add expressionPrefix="AxLabel" type="Microsoft.Dynamics.Framework.Portal.UI.Labels, Microsoft.Dynamics.Framework.Portal, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<add expressionPrefix="AxDataSet" type="Microsoft.Dynamics.Framework.Portal.UI.AxDataSetExpressionBuilder, Microsoft.Dynamics.Framework.Portal, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<add expressionPrefix="AxEnum" type="Microsoft.Dynamics.Framework.Portal.UI.AxEnumExpressionBuilder, Microsoft.Dynamics.Framework.Portal, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<add expressionPrefix="AxEDT" type="Microsoft.Dynamics.Framework.Portal.UI.AxEDTExpressionBuilder, Microsoft.Dynamics.Framework.Portal, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
</expressionBuilders>