I have an visual webpart and I need to populate drop down with content extracted from xml file. How can I provision that XML file with feature and then how can I access it from my codebehind to be able read it?
To deploy your file so that SharePoint can access it, you have several options but in your case as it is needed only by your feature event receiver you can deploy it under the feature's root folder. To do so, simply put your file inside a module with a deployment type of "ElementFile". Something like:
Then to access it in code behind read it from the path :