title: Sharepoint 2k7 - Custom WebPart not loading
body: <p>First off i am a big fat NOOB in regards to Sharepoint 2007 webpart development but i am working at it.</p>
  
  <p>Now for the real problem, so i develop this webpart and follow the 'Loose' advise from various sites on how to setup the features.xml, .xml, manifest.xml, solution.ddf and solution.build files.  Basically, i have a all-in-one solution where i build the webpart and then in post-build event compile all the source files into the WSP deployment package.</p>
  
  <p>Problem i am having is that I can add the solution to the sharepoint site but when i go to Deploy it through CA-Operations-Solution management i get this great error:</p>
  
  <blockquote>
    <h2>Error as reported from Sharepoint</h2>
    
    <p>Failed to instantiate file "ChartPartWP.webpart" from module "ChartPartWP": Source path "ChartPartWP\ChartPartWP.webpart" not found.</p>
  </blockquote>
  
  <p>When i looked at the file-system the folder ChartPart is present in TEMPLATE\FEATURES with the ChartPartWP.webpart and other support files.</p>
  
  <p>What is not happening that i need to resolve.</p>
  
  <p>Edit: 10/24/2011 @ 11:36PM</p>
  
  <h2>Solution.ddf</h2>
  
  <pre><code>.OPTION EXPLICIT
  .Set CabinetNameTemplate=ChartPartWP.wsp
  .Set DiskDirectoryTemplate=CDROM
  .Set DiskDirectory1=Package
  .Set CompressionType=MSZIP
  .Set UniqueFiles="ON"
  .Set Cabinet=On
  .Set SourceDir="\\&lt;fileserver&gt;\common share\Software_Development\MPT\Sharepoint2007\ChartPart\"
  
  Manifest.xml manifest.xml
  
  ; binary
  bin\release\TCBOE.ChartPart.dll TCBOE.ChartPart.dll
  
  ; feature files
  TEMPLATE\FEATURES\ChartPartWP\ChartPartWP.xml ChartPartWP\ChartPartWP.xml
  TEMPLATE\FEATURES\ChartPartWP\feature.xml ChartPartWP\Feature.xml
  
  ; web part files
  TEMPLATE\FEATURES\ChartPartWP\ChartPartWP.webpart ChartPartWP\ChartPartWP.webpart
  TEMPLATE\FEATURES\ChartPartWP\LockedChartPartWP.webpart ChartPartWP\LockedChartPartWP.webpart
  </code></pre>
  
  <h2>manifest.xml</h2>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;Solution xmlns="http://schemas.microsoft.com/sharepoint/"
   SolutionId="{0C32EA7F-78C2-4814-A4C9-88256E49E371}"&gt;
    &lt;FeatureManifests&gt;
      &lt;FeatureManifest Location="ChartPartWP\feature.xml" /&gt;
    &lt;/FeatureManifests&gt;
    &lt;Assemblies&gt;
      &lt;Assembly Location="TCBOE.ChartPart.dll"
                DeploymentTarget="GlobalAssemblyCache" /&gt;
    &lt;/Assemblies&gt;
  &lt;/Solution&gt;
  </code></pre>
  
  <h2>ChartPartWP.xml</h2>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;Elements xmlns="http://schemas.microsoft.com/sharepoint/"&gt;
      &lt;Module Name="ChartPartWP" 
                List="113" Url="_catalogs/wp" 
                Path="ChartPartWP" 
                RootWebOnly="True"&gt;
          &lt;File Url="ChartPartWP.webpart" Type="GhostableInLibrary"&gt;
              &lt;Property Name="Group" Value="ChartParts" /&gt;
          &lt;/File&gt;
          &lt;File Url="LockedChartPartWP.webpart" Type="GhostableInLibrary"&gt;
              &lt;Property Name="Group" Value="ChartParts" /&gt;
          &lt;/File&gt;
      &lt;/Module&gt;
  &lt;/Elements&gt;
  </code></pre>
  
  <h2>feature.xml</h2>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt;
  &lt;Feature xmlns="http://schemas.microsoft.com/sharepoint/"
    Id="47D62F5E-B0E0-4f93-BCD1-081CA794527C" Version="3.5.1.0"
    Title="TCBOE ChartPart"
    Description="Provides a Chart Web object to be used in Sharepoint 2007."
    AutoActivateInCentralAdmin="TRUE"
    Scope="Site"&gt;
      &lt;ElementManifests&gt;
          &lt;ElementManifest Location="ChartPartWP.xml" /&gt;
          &lt;ElementFile Location="ChartPartWP.webpart" /&gt;
          &lt;ElementFile Location="LockedChartPartWP.webpart"/&gt;
      &lt;/ElementManifests&gt;
  &lt;/Feature&gt;
  </code></pre>
  
  <p>Would there be any receivers/handlers i need make are implemented for the installation to take hold?  I didnt read anything about it but read something about a FeatureReceiver for a purpose, but cant remember for the life-of-it, why you need the FeatureReceiver (<a href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spfeaturereceiver.aspx" rel="nofollow" title="SPFeatureReceiver">SPFeatureReceiver</a>)</p>