I’m trying to add my first web part to the working environment and have some problems with the deployment. I clicked on my development machine release and copy the *.wsp file from the "bin/release" folder to the working environment SharePoint desktop.

I deployed the *.wsp file with following command:

Add-SPSolution C:\User\admin\Desktop\ProjectName.wsp
Install-SPSolution -Identity ProjectName.wsp -WebApplication http://sharepointportal –GACDeployment

from the working environment SharePoint. Everything works fine.

After that I activated the feature in SharePoint and tried to add it to a page. Here occurs the error. If I try to add the web part, SharePoint tells me, that the web part element was deleted in the catalogue. If I went to "All Web Parts", the web part is listed, but if I click on it, SharePoint tells me that the web part is missing, what went wrong?

In C:\windows\assembly, the assembly exists and also the SafeControl entry in web.config exist.

<SafeControl Assembly="ProjectName, Version=, Culture=neutral, PublicKeyToken=314328d2d4e8850d" Namespace="ProjectName.Dictionary" TypeName="*" Safe="True" SafeAgainstScript="False" />

What I did wrong?

Additional informations

I'm honestly a little bit confused, because I have renamed the Feature from, I think, Feature1 to Dictionary, maybe there is the problem.

Yes, the web part class is public:

public class Dictionary : Microsoft.SharePoint.WebPartPages.WebPart

Here a small dump from my project folder:

Project Folder

The Dictionary.feature contains:

<Feature xmlns="http://schemas.microsoft.com/sharepoint/" Title="Titel" Id="..." Scope="Site">
    <ElementFile Location="Dictionary\Dictionary.webpart" />
    <ElementManifest Location="Dictionary\Elements.xml" />

The Package.package contains:

    <Assembly Location="ProjectName.dll" DeploymentTarget="GlobalAssemblyCache">
        <SafeControl Assembly="ProjectName, Version=, Culture=neutral, PublicKeyToken=...." Namespace="ProjectName.Dictionary" TypeName="*" />
    <TemplateFile Location="CONTROLTEMPLATES\ProjectName\Dictionary\DictionaryUserControl.ascx" />
    <TemplateFile Location="Layouts\ProjectName\Button.css" />
    <TemplateFile Location="Layouts\ProjectName\Dialog.aspx" />
    <TemplateFile Location="Layouts\ProjectName\javascripts\jquery-1.6.4.min.js" />
    <TemplateFile Location="Layouts\ProjectName\Site.css" />
    <FeatureManifest Location="ProjectName_Dictionary\Feature.xml" />

Does that help further?


  • Does your project include the elements.xml, the classfile, and the webpart file for the webpart? Nov 14, 2011 at 16:08
  • Did you mark the webpart class as Public?
    – Dave Wise
    Nov 14, 2011 at 16:54
  • See my Additional informations. Is it really enough just to deploy the *.wsp? Thanks. Greetz
    – user5167
    Nov 14, 2011 at 17:39
  • Btw, what is the different between the Release "/bin/release" and the package (pkg, pkgobj, obj). Greetz
    – user5167
    Nov 14, 2011 at 17:55

2 Answers 2


Now I got it! The problem occurs after I updated the web part. I updated the wep part with:

Update-SPSolution -Identity ProjectName.wsp -LiteralPath C:\test\ ProjectName.wsp –GACDeployment

and after that I use:

Enable-SPFeature FeatureName  -Url http://... 

to update the web part. Now share point doesn’t find the web part and I get the error from above.

I fixed it with the following steps:

1. Uninstall-SPSolution –Identity ProjectName.wsp –WebApplication http://...
2. Check if the Feature is deactivated, removed.
3. Delete the web part from the web part gallery.
4. Remove-SPSolution –Identity ProjectName.wsp

Did I something wrong with the update? Everytime I update the web part, the error occur.


If I deactivate the web part in the global site collection, update it with Update-SPSolution and activate it, everything works fine!

Thanks everyone. Greetz


Make sure you have the same Namespace for webpart and safecontrol entry. Also it make sense to double check the assembly name, public token and version.

Also check the .webpart file and elements - to make sure you have the same values everywhere

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.