I was getting this error message in Visual Studio 2008 when adding a custom activity to an existing workflow. Solution This worked for me, your mileage, may and probably will vary. It was necessary for me to un-gac the workflow project, then the custom activities could be added to the design surface as expected.
Archive for 2009
SharePoint custom workflow activity. “Failed to load toolbox item. It will be removed from toolbox.”
Posted in sharepoint, workflow, tagged activity, bug, custom activity, custom workflow, sharepoint, workflow on December 27, 2009 | 6 Comments »
Safe mode did not start successfully. Could not load file or assembly
Posted in sharepoint, tagged debugging, sharepoint on December 22, 2009 | Leave a Comment »
Ever get any of these errors? The DataSourceID of ‘TopNavigationMenu’ must be the ID of a control of type IHierarchicalDataSource. A control with ID ‘topSiteMap’ could not be found. at System.Web.UI.WebControls.HierarchicalDataBoundControl.GetDataSource() at System.Web.UI.WebControls.HierarchicalDataBoundControl.ConnectToHierarchicalDataSource() at System.Web.UI.WebControls.HierarchicalDataBoundControl.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at [...]
Programmatically determine is a feature is activated or even installed
Posted in .net, sharepoint, tagged sharepoint, SPFeature, SPFeatureCollection, SPFeatureDefinition on December 17, 2009 | Leave a Comment »
Okay so ever needed to see if a particular web or site feature is activated? Well if it’s activated it will be in the SPWeb.Features SPFeatureCollection or SPSite.Features. If it’s not activated it won’t be. Simple. To check if a feature is installed examine the feature definitions collection on the SPFarm object, below are a [...]
The imported project “C:\Program Files\MSBuild\Microsoft.Office.InfoPath.targets” was not found
Posted in development, sharepoint, tagged infopath, msbuild, sharepoint on December 17, 2009 | Leave a Comment »
If you get this error message, which I did this morning opening up someone else’s SharePoint solution, make sure you have InfoPath installed. Once I installed the InfoPath client application with .Net Programmability Support, see below, the targets file was installed to the MSBuild directory.
You cannot customize permission levels in a web site with inherited permission levels. at Microsoft.SharePoint.SPRoleDefinitionCollection.Add(SPRoleDefinition role)
Posted in sharepoint, tagged sharepoint, SPRoleDefinition on December 16, 2009 | 1 Comment »
Okay simple solution here: Make sure that if you are not the root SPWeb and you want to add custom role definitions i.e. SPRoleDefinitions call SPRoleDefinitionCollection.BreakInheritance(bool,bool)
Server Out Of Memory – There is no memory on the server to run your program. Please contact your administrator with this problem. at Microsoft.SharePoint.Library.SPRequestInternalClass.ApplyWebTemplate(String bstrUrl, String& bstrWebTemplate, Int32& plWebTemplateId)
Posted in bugs, sharepoint, tagged bug, onet.xml, sharepoint on December 15, 2009 | Leave a Comment »
There are lots of reasons this error message can occur, see: http://www.google.com/search?q=sharepoint+Server+Out+Of+Memory. In my case it happened when a new site was being provisioned using a custom site definition during the ApplyWebTemplate call. Turned out the there were subtle errors in my onet.xml. In particular I was referencing some document templates using an incorrect path:
Lookup the Netbios name of a domain using directory services
Posted in .net, tagged .net, ActiveDirectory, DirectoryServices, Domain on December 14, 2009 | 1 Comment »
Okay so its pretty easy to get the fully qualified domain name (FQDN). But what happens if you want to get the old-skool netbios name. The quickest way is to use System.Environment: This gets the network domain name associated with the current user. So not much good if your code is running as a service [...]
SharePoint field constants.
Posted in sharepoint, tagged field, fieldconstant, fieldid, sharepoint, SPBuiltInContentTypeId, SPBuiltInFieldId on December 14, 2009 | Leave a Comment »
I always forget the name of the class that stores a great big list of field ID constants. So as a reminder to myself it’s SPBuildInFieldId For example: Whilst looking this up again I stumbled across another similar class SPBuiltInContentTypeId that holds content type id’s for the common OOTB content types, neat!