I was trying to create a feature that used a custom feature receiver which was called when the feature was activated and I was following all of the different examples and samples and blogs that were out there, but I kept getting this error:
Failed to create feature receiver object from assembly "AssemblyName, Version=1.0.0.0, Culture=neutral, PublicKeyToken=KEY", type "AssemblyName.ClassName" for feature GUID: System.ArgumentNullException: Value cannot be null.
Parameter name: type
at System.Activator.CreateInstance(Type type, Boolean nonPublic)
at System.Activator.CreateInstance(Type type)
at Microsoft.SharePoint.Administration.SPFeatureDefinition.get_ReceiverObject()
no idea what this was at all, but I think I did find what fixed it!
In the <Feature> element of my Feature.xml file, I took out the SolutionID attribute, and then I added AlwaysForceInstall="true" and ActivateOnDefault="false". To get the feature to activate on install, call stsadm -o activatefeature in the bat file you use to install the solution...
Update (8/31/2007):
Figured a little more out about this. One potential issue is that the fully qualified class name might not be correct. In MOSS development, we often change the namespace of a class to be different than the one Visual Studio gives it when the class file is created. Make sure the feature receiver class name matches the one in the class file...