Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Error when installing feature through WSP file

  Asked By: Dario    Date: Jul 18    Category: Sharepoint    Views: 4564

I have created a feature which refers an assemly.

I am able to manually install the feature by copying the feature.xml to the
FEATURES\FeatureName folder and loading the assembly into the GAC and running
the STSADM command.

I am trying to automate the feature install by creating the wsp file. The file
gets created fine and the STSADM command to addsolution works fine. When I try
to use DeploySolution option in Central Admin I am getting the sharepoint error,
"The method or operation is not implemented".

I did verify that the files feature.xml, manifest.xml and the assembly are in
the wsp file and both the ddf and manifest.xml refer both the feature.xml and
assembly correctly. So, any help in this is greatly appreciated. Thank you very



8 Answers Found

Answer #1    Answered By: Jermaine Schmidt     Answered On: Jul 18

What are you using in the wsp  file to deploy the assembly? The manifest
should contain an <assembly element that is set to deploy the dll to the
Global assembly  Cache. Could you list the manifest.xml file  that you
are using?

Answer #2    Answered By: Tyrone Meyer     Answered On: Jul 18

Below is the Manifest.xml(and also feature.xml)
that I am using.

<?xml version="1.0" encoding="utf-8" ?>
<Solution xmlns="http://schemas.microsoft.com/sharepoint/" target="_blank" rel="nofollow">http://schemas.microsoft.com/sharepoint/"
<FeatureManifest Location="ThemeChanger\feature.xml"/>
<Assembly DeploymentTarget="GlobalAssemblyCache" Location="ThemeChanger.dll"/>
<?xml version="1.0" encoding="utf-8" ?>
<Feature xmlns="http://schemas.microsoft.com/sharepoint/" target="_blank" rel="nofollow">http://schemas.microsoft.com/sharepoint/"
Title="Theme Changer"
Description="Change the Theme of this site"
ReceiverAssembly="ThemeChanger, Version=, Culture=neutral,
<Property Key="Theme" Value="simple"/>

Answer #3    Answered By: Dean Neal     Answered On: Jul 18

Everything in the feature  file and the manifest  look correct. Is the
feature file  in the root of the wsp  cab or did you put it in a
ThemeChanger directory in the wsp cab file? If you aren't sure you can
check by renaming the wsp file with a .cab extension and then opening it
with winzip. You should see manifest in the root and feature.xml in a

I'm also wondering why the namespace for your class and the name of the
dll are different. I know this is possible, but its not common. Are
you sure you are using the correct strong name for the assembly  and the
correct fully qualified name for the class?

Answer #4    Answered By: Vincent Griffin     Answered On: Jul 18

Yes. The feature.xml is present in the ThemeChanger folder  of the WSP cab

The namespace of the class and the name of the dll are different because we
have different dlls for different features and wanted all the classes to be in
the same name space.

The strong name and the way dll is referred in feature.xml seems to be fine
because, I am able to manually  install the feature  and it works  fine. The
problem comes only when I am using the WSP file.

Answer #5    Answered By: Antoine Barker     Answered On: Jul 18

In looking at this some more I'm not sure where the Feature fits into
all this. Are you trying to invoke the assembly  when the Feature is
activated? If not, how is the Feature being invoked. And what are you
using the property declaration for?

Take a look at this blog entry where I create and install  a Feature
event receiver through a Feature file.


Answer #6    Answered By: George Watson     Answered On: Jul 18

Yes. I am invoking the assembly  when the feature  is getting activated. The
property declaration is used to supply the value to the assembly which will be
used for setting the theme, for the particular site that is activating the

I am using this feature in the site definition for the Theme to be
automatically set, when the site is created  out of this site definition.

Answer #7    Answered By: Gabriel Patterson     Answered On: Jul 18

This is resolved and it is a simple mistake from my side. Sorry for troubling
you on this.

I have the following lines of code in my cs class and the exception line is
NOT commented.
public override void FeatureInstalled(SPFeatureReceiverProperties properties)
//throw new Exception("The method  or operation  is not implemented.");
It is quite surprising though that manually installing  the feature  doesn't raise
the FeatureInstalled Event and so there is no problem when installing the
feature manually.

Answer #8    Answered By: Victor Hughes     Answered On: Jul 18

I suspect the exception is being thrown when the
feature is installed. But when you install  it manually  you are on the
command line so there is no context for the feature  to display the error
message. When you install it by deploying the solution there is a Web
Context to raise and handle the feature in.

Didn't find what you were looking for? Find more on Error when installing feature through WSP file Or get search suggestion and latest updates.