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=1.0.0.0, 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:
The Dictionary.feature
contains:
<Feature xmlns="http://schemas.microsoft.com/sharepoint/" Title="Titel" Id="..." Scope="Site">
<ElementManifests>
<ElementFile Location="Dictionary\Dictionary.webpart" />
<ElementManifest Location="Dictionary\Elements.xml" />
</ElementManifests>
</Feature>
The Package.package
contains:
<Assemblies>
<Assembly Location="ProjectName.dll" DeploymentTarget="GlobalAssemblyCache">
<SafeControls>
<SafeControl Assembly="ProjectName, Version=1.0.0.0, Culture=neutral, PublicKeyToken=...." Namespace="ProjectName.Dictionary" TypeName="*" />
</SafeControls>
</Assembly>
</Assemblies>
<TemplateFiles>
<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" />
</TemplateFiles>
<FeatureManifests>
<FeatureManifest Location="ProjectName_Dictionary\Feature.xml" />
</FeatureManifests>
Does that help further?
Greetz
*.wsp
? Thanks. GreetzRelease "/bin/release"
and thepackage (pkg, pkgobj, obj)
. Greetz