Use Your App as Module Element
On SharePoint
In this post I will explain how to use your SharePoint app as module element to copy files to particular location in the Host SharePoint site.
- Create new Application
- You will find that an application project has been created for you
- Go to the App project properties
- For the property "Handle App Installed" and "Handle App Uninstalling" enable both of them
- Visual studio will confirm creation of an web project
- After the new web application project has been created place all your files in the web application In my case I placed all the files under PageLayout folder
- In the AppEventReceiver.svc you can find that a method has been created for you
- In this method we will add the code to handle adding files as the application been installed and removing files as the application uninstalled
- When Application installed it copies all the directories and the files within the "PageLayout" folder to the master page library recursively
- You can download the Full source code from here
No Comment to " Use Your App as Module Element "