Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have a SharePoint 2010 server and a development pc. I installed Visual Studio 2010 in my pc, and I created a web part. After I build the project I got the CreateTaskWebPart.wsp and CreateTaskWebPart.dll.

I deployed that solution using powershell. I executed the following commands to deploy my solution.

add-SPSolution c:\temp\solution1\CreateTaskWebPart.wsp install-SpSolution -Identity CreateTaskWebPart.wsp -WebApplication

http://moss2010:81/SitePages -GACDeployment

I went to Central Administration-> System Settings -> Manage Farm solutions. And I see that the web part was deployed to http://moss2010:81.

When I try to use that web part, I cannot see the the custom folder under Categories. So I am not able to use the webpart.


Edit:

Sorry for the delay. I am sending the elements, feature and manifest

This is the Elements.xml

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/" >
  <Module Name="SimpleWebPart" List="113" Url="_catalogs/wp">
    <File Path="SimpleWebPart\SimpleWebPart.webpart" Url="SimpleWebPart.webpart" Type="GhostableInLibrary" >
      <Property Name="Group" Value="Custom" />
    </File>
  </Module>
</Elements>

This is the Feature.xml

<?xml version="1.0" encoding="utf-8"?>
<Feature xmlns="http://schemas.microsoft.com/sharepoint/" Description="My Visual WebPart Feature" Id="98d7ec0c-ba7c-4803-b722-e02e5507624c" Scope="Site" Title="CreateTaskWebPart Feature1">
  <ElementManifests>
    <ElementManifest Location="VisualWebPart1\Elements.xml" />
    <ElementFile Location="VisualWebPart1\VisualWebPart1.webpart" />
  </ElementManifests>
</Feature>

This is the manifest.xml

<?xml version="1.0" encoding="utf-8"?>
<Solution xmlns="http://schemas.microsoft.com/sharepoint/" SolutionId="65eddfe5-1611-4c2e-970d-f6b3784d570e" SharePointProductVersion="14.0">
  <Assemblies>
    <Assembly Location="CreateTaskWebPart.dll" DeploymentTarget="GlobalAssemblyCache">
      <SafeControls>
        <SafeControl Assembly="CreateTaskWebPart, Version=1.0.0.0, Culture=neutral, PublicKeyToken=eca34ed344b67602" Namespace="CreateTaskWebPart.VisualWebPart1" TypeName="*" />
      </SafeControls>
    </Assembly>
  </Assemblies>
  <TemplateFiles>
    <TemplateFile Location="CONTROLTEMPLATES\CreateTaskWebPart\VisualWebPart1\VisualWebPart1UserControl.ascx" />
  </TemplateFiles>
  <FeatureManifests>
    <FeatureManifest Location="CreateTaskWebPart_Feature1\Feature.xml" />
  </FeatureManifests>
</Solution>

Thanks for your help

share|improve this question
    
Please paste the Elements.xml from your web part folder in the Visual Studio solution. –  James Love Aug 3 '11 at 18:57

3 Answers 3

Adding as an answer since I don't have enough rep to comment yet...

Rob D'Oria's answer is mostly correct. What worked for me would be something similiar to:

    Enable-SPFeature –identity "CreateTaskWebPart_Feature1" -URL http://moss2010:81 

You have to include an underscore for it to work properly. So if your feature "Title" attribute is "CreateTaskWebPart Feature1" then the identity you provide with Enable_SPFeature should be "CreateTaskWebPart_Feature1".

share|improve this answer

Also, if you update the solution and do not see the changes that are expected try deactivating/re-activating the feature.

share|improve this answer

If you packaged it up as a feature then you probably need to enable the feature.

Go to Site Actions > Site Settings > Site collection features and make sure the feature associated with your webpart is Activated.

You could also activate it via PowerShell:

Enable-SPFeature –identity "CreateTaskWebPart" -URL http://moss2010:81
share|improve this answer
    
Hi Rob, Thanks for trying to help me. After I typed your sentence, I got an error "Enable-SPFeature : The Feature is not a Farm Level Feature and is not found..." I would like to say that I am following a very simple example found online. Most of the job is done by Visual Studio 2010. The only problem is the deployment. I am not allowed to install Visual Studio in the SharePoint Server. So I deployed manually. Do you think that I need to change something in the sharepoint setting to see webparts created? I am not sure if I have to use the sentral admin to fix my problem. –  jhonny marcelo Aug 3 '11 at 20:11
1  
Could you share the .WSP file? Would allow us to look at the manifest and feature XML and probably quickly pinpoint the problem. The 1st approach I mentioned to activate the feature was not Central Admin, it was the Site Settings...so if you're in the site trying to add the web part you can just go to the upper-left-hand corner, click Site Actions, then Site Settings, and then Site collection features ...if it deployed correctly you should see a feature for your web part in the list...Activate it. –  Rob D'Oria Aug 3 '11 at 20:21
    
OK, try the Enable-SPFeature command again but instead of "CreateTaskWebPart" use "CreateTaskWebPart Feature1"...i.e. the Title attribute on the Feature node in your Feature.xml file. –  Rob D'Oria Aug 4 '11 at 17:18

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.