I'm working on a (non-visual) Web Part and wish to read from an xml file placed in the "C:\inetpub\wwwroot\wss\VirtualDirectories\80\wpresources" folder:
Code-Behind:
string sUri = @"C:\inetpub\wwwroot\wss\VirtualDirectories\80" + @"\wpresources\links.xml";
Can someone help me with the correct syntax for the Feature.xml to include this XML file when deploying the Feature?
UPDATE 10-08-2012:
Tried adding links.xml to same location as the Web Part and got following error:
Error occurred in deployment step 'Add Solution': Error: Cannot find this file specified in the manifest file: SecureLinksWP_Feature1\SecureLinks\links.xml
Elements.xml:
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/" >
<Module Name="SecureLinks" List="113" Url="_catalogs/wp">
<File Path="SecureLinks\SecureLinks.webpart" Url="SecureLinks.webpart"
Type="GhostableInLibrary">
<Property Name="Group" Value="Custom" />
</File>
<File Path="SecureLinks\links.xml" Url="SecureLinks/links.xml"
Type="GhostableInLibrary" />
</Module>
</Elements>
Feature1.Template.xml:
<?xml version="1.0" encoding="utf-8" ?>
<Feature Id="4BB4B62C-4F2F-4BB5-A477-DF783B802DD5"
Title="SecureLinksWP"
Scope="Site"
Version="1.0.0.0"
Hidden="FALSE"
DefaultResourceFile="core"
xmlns="http://schemas.microsoft.com/sharepoint/">
<ElementManifests>
<ElementManifest Location="SecureLinks\Elements.xml" />
<ElementFile Location="SecureLinks\SecureLinks.webpart" />
<ElementFile Location="SecureLinks\links.xml" />
</ElementManifests>
</Feature>