0

I have a requirement in which I have to add NWF (Nintex workflow) file in the Features folder. Means on feature activation the file for the workflow should get provisioned in the physical folder, say, (Templates/Features/FeatureName). Is there any Settings for the property of the added file in visual studio which is to be set to get this done? What are the possible ways in which I can achieve this ?

I want to access this NWF file in my feature receiver using feature receiver properties (Properties.Definition.Getfile(PathToFile)), for this I want to add the file in the feature folder itself.

For example if my feature name is Workflows, then the workflow file should get provisioned in the "Workflows" folder in 15 hive.

How can I achieve this using modules in a visual studio solution?

Thanks

closed as off-topic by Eric Alexander Jul 28 '15 at 12:00

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

1

First off, I assume you are building a Farm Solution since you can not provision any files to the SharePoint System Folders using a Sandbox Solution.

Secondly, you shouldn't be using a Module to do this. If you really need to add a file to the Features folder (which I'm 99% sure you don't since I've never seen any example of having to do this in eight years of SharePoint development), you should be using a Mapped Folder instead.

All of that said, here is the answer to your question. You do not need to do anything to add a file to the Features folder when using a Module. The file is automatically added there.

For example, let's say you have a Feature named MyFeature which contains a Module named MyModule which contains a file named Sample.txt. When you deploy the Solution the Features folder will now contain MyFeature\MyModule\Sample.txt.

  • thanks for the answer. but i want that my file should get stored in a physical location, not in a database. Means, for example, say if my feature is "Modules" then the file should get placed in the "Modules" folder inside 15 hive. is there any property which has to be set in VS solution, like "Deployment Type" ? – Vishwas Goswami Jul 6 '15 at 4:49
  • 1
    Using a Module puts files in the file system and in the database. However, I'm 99% certain Modules are not the way to achieve what you want to do. I suggest you update your question to describe your exact requirement so we can discuss implementation options to achieve that result. – Rob Windsor Jul 6 '15 at 13:01

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