I've got a web part that I'm trying to test in a single-server development VM environment. It deploys fine, and shows up under my Site Collection Features, but when I try to activate it, I get this error:
"Failed to instantiate file "InstallationMap.webpart" from module "InstallationMapWebPart": Source path "InstallationMap.webpart" not found. at Microsoft.SharePoint.Library.SPRequestInternalClass.EnableModuleFromXml(String bstrFeatureDirectory,
String bstrUrl, String bstrXML)
at Microsoft.SharePoint.Library.SPRequest.EnableModuleFromXml(String bstrFeatureDirectory, String bstrUrl, String bstrXML)"
My environment is:
Windows Server 2003 x64 (fully patched), MOSS 2007 Standard (build 12.0.0.6608), and SQL Server 2005 (fully patched).
I used WSPBuilder and I'm trying to do it as a bin deployment rather than GAC. I checked and the web part file is located in the feature folder. I'm not sure why it can't find it there. After some googling, I've found other answers to similar problems, but none of those seem to apply in this case.
Manifest.xml
<?xml version="1.0"?> <!-- Solution created by WSPBuilder. 6/21/2012 2:39:21 PM --> <Solution SolutionId="555b8473-f5b2-4d05-891c-ce09bcc4716e" xmlns="http://schemas.microsoft.com/sharepoint/"> <Assemblies> <Assembly Location="InstallationMapWebPart.dll" DeploymentTarget="WebApplication"> <SafeControls> <SafeControl Assembly="InstallationMapWebPart, Version=1.0.0.0, Culture=neutral, PublicKeyToken=01ca2278eac9ed50" Namespace="InstallationMapWebPart.UI.WebControls.WebParts" TypeName="*" Safe="True" /> </SafeControls> </Assembly> </Assemblies> <TemplateFiles> <TemplateFile Location="LAYOUTS\InstallationMapWebPart\Silverlight.js" /> <TemplateFile Location="LAYOUTS\InstallationMapWebPart\SLInstallationMap.xap" /> <TemplateFile Location="LAYOUTS\InstallationMapWebPart\SPSilverlight.js" /> </TemplateFiles> <CodeAccessSecurity> <PolicyItem> <PermissionSet class="NamedPermissionSet" version="1" Description="WSPBuilder generated permissionSet" Name="InstallationMapWebPart689e157e-f9b7-46b0-824d-429fe2499ef9"> <IPermission class="AspNetHostingPermission" version="1" Level="Medium" /> <IPermission class="SecurityPermission" version="1" Flags="Assertion, Execution, ControlThread, ControlPrincipal, RemotingConfiguration" /> <IPermission class="SharePointPermission" version="1" ObjectModel="True" /> <IPermission class="EnvironmentPermission" version="1" Read="TEMP;TMP;USERNAME;OS;COMPUTERNAME" /> <IPermission class="PrintingPermission" version="1" Level="DefaultPrinting" /> <IPermission class="WebPartPermission" version="1" Connections="True" /> <IPermission class="FileIOPermission" version="1" Read="$AppDir$" Write="$AppDir$" Append="$AppDir$" PathDiscovery="$AppDir$" /> <IPermission class="WebPermission" version="1"><ConnectAccess><URI uri="$OriginHost$" /></ConnectAccess></IPermission> <IPermission class="IsolatedStorageFilePermission" version="1" Allowed="AssemblyIsolationByUser" UserQuota="9223372036854775807" /> <IPermission class="DnsPermission" version="1" Unrestricted="true" /> <IPermission class="SmtpPermission" version="1" Access="Connect" /> <IPermission class="SqlClientPermission" version="1" Unrestricted="true" /> </PermissionSet> <Assemblies> <Assembly Name="InstallationMapWebPart" Version="1.0.0.0" PublicKeyBlob="0024000004800000940000000602000000240000525341310004000001000100A5E1D878842DD9DEB6B7DB0560EFEFB43DF84F1102E84A176BFE5E92C6C66E19607770CAF4A0371444C57D233744B85A32C93685BDDC00F88211D6D882550FE9F286BEAE4B047D44453C4E8D8B1105AB798C960BC143E0A4C8178058D9346D7301F20BF41C9196BC36D06637DFD3C095CFABD5FABE43E90E2A533F75043CE9CE" /> </Assemblies> </PolicyItem> </CodeAccessSecurity> <FeatureManifests> <FeatureManifest Location="InstallationMapWebPart\feature.xml" /> </FeatureManifests> </Solution>
Elements.xml
<?xml version="1.0" encoding="utf-8" ?> <Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <Module Name="InstallationMapWebPart" Url="_catalogs/wp" RootWebOnly="TRUE"> <File Url="InstallationMap.webpart" Type="GhostableInLibrary"> <Property Name="Group" Value="MyGroup"></Property> <Property Name="QuickAddGroups" Value="MyGroup" /> </File> </Module> </Elements>
Feature.xml
<?xml version="1.0" encoding="utf-8"?> <Feature Id="0B7C5735-18D4-4D84-B1E4-234070A19CA2" Title="InstallationMapWebPart" Description="Map control used to display Installation locations." Version="1.0.0.0" Hidden="FALSE" Scope="Site" DefaultResourceFile="core" ReceiverAssembly="InstallationMapWebPart, Version=1.0.0.0, Culture=neutral, PublicKeyToken=580acf16e5a44281" ReceiverClass="InstallationMapWebPart.EventHandlers.Features.InstallationMapReceiver" xmlns="http://schemas.microsoft.com/sharepoint/"> <ElementManifests> <ElementManifest Location="elements.xml"/> <ElementFile Location="InstallationMapWebPart.webpart" /> </ElementManifests> </Feature>