Comments on: Generic Feature Receiver for Features that Deploy WebParts http://trentacular.com/2009/04/generic-feature-receiver-for-webpart-deployment-features/ Trent Foley's Spectacular Technical Blog Fri, 18 May 2012 14:01:04 +0000 hourly 1 http://wordpress.org/?v=3.3.2 By: DenisR http://trentacular.com/2009/04/generic-feature-receiver-for-webpart-deployment-features/comment-page-1/#comment-2217 DenisR Wed, 24 Aug 2011 10:39:37 +0000 http://trentacular.com/?p=109#comment-2217 Thanks for the solution. I would recommend more unified way of loading web parts gallery (without string hardcoding): var webPartsGallery = rootWeb.GetCatalog(SPListTemplateType.WebPartCatalog); It works without problems for me. Thanks for the solution.

I would recommend more unified way of loading web parts gallery (without string hardcoding):
var webPartsGallery = rootWeb.GetCatalog(SPListTemplateType.WebPartCatalog);

It works without problems for me.

]]>
By: Jan http://trentacular.com/2009/04/generic-feature-receiver-for-webpart-deployment-features/comment-page-1/#comment-1370 Jan Mon, 17 May 2010 14:03:34 +0000 http://trentacular.com/?p=109#comment-1370 Hi, if you change var wpGallery = rootWeb.Lists["Web Part Gallery"]; into var wpGallery = rootWeb.GetList("/_catalogs/wp"); It will work in other languages Hi,

if you change
var wpGallery = rootWeb.Lists["Web Part Gallery"];
into
var wpGallery = rootWeb.GetList(“/_catalogs/wp”);

It will work in other languages

]]>
By: Trent http://trentacular.com/2009/04/generic-feature-receiver-for-webpart-deployment-features/comment-page-1/#comment-973 Trent Tue, 29 Dec 2009 15:52:00 +0000 http://trentacular.com/?p=109#comment-973 @Perry - Thanks for bringing this up. The 'Cast' method is an extension method located in the System.Linq.Enumerable class. You will need to include a using statement for the System.Linq namespace. Extension methods can be a little tricky to track down. @Perry – Thanks for bringing this up. The ‘Cast’ method is an extension method located in the System.Linq.Enumerable class. You will need to include a using statement for the System.Linq namespace. Extension methods can be a little tricky to track down.

]]>
By: Perry http://trentacular.com/2009/04/generic-feature-receiver-for-webpart-deployment-features/comment-page-1/#comment-971 Perry Tue, 29 Dec 2009 05:10:13 +0000 http://trentacular.com/?p=109#comment-971 What namespaces are required? I can't figure out what namespace is required to solve the error: Error 1 'Microsoft.SharePoint.Administration.SPElementDefinitionCollection' does not contain a definition for 'Cast' and no extension method 'Cast' accepting a first argument of type 'Microsoft.SharePoint.Administration.SPElementDefinitionCollection' could be found (are you missing a using directive or an assembly reference?) What namespaces are required?

I can’t figure out what namespace is required to solve the error:

Error 1 ‘Microsoft.SharePoint.Administration.SPElementDefinitionCollection’ does not contain a definition for ‘Cast’ and no extension method ‘Cast’ accepting a first argument of type ‘Microsoft.SharePoint.Administration.SPElementDefinitionCollection’ could be found (are you missing a using directive or an assembly reference?)

]]>
By: John Powell http://trentacular.com/2009/04/generic-feature-receiver-for-webpart-deployment-features/comment-page-1/#comment-635 John Powell Fri, 28 Aug 2009 19:36:08 +0000 http://trentacular.com/?p=109#comment-635 Nice work! Nice work!

]]>