3

I am trying to find out if it is possible to change code on fly when it comes to SharePoint 2013 Hosted Add-ins.

I have SP2013 Online site and VS2015 running. I create a simple SP Hosted Add-in, hit F5 and it deploys. But while it is running I would like to add/remove javascript code in App.JS so I can then just save it and when I refresh the browser I could see changes immediately.

I understand that deplopyment copies files to the SP sever, but do I have to retract and deploy solution each time while debugging? It is very slow and cumbersome process especially while learning and experimenting.

I have been googling for a while, but apparently I do not know what to ask :)

Thank you for your help.

1 Answer 1

6

Here are some options:

  • If you run from VS with F5 (run with debugging), VS will track your changes in app.js and will update corresponding file on the app web. That is good for very simple scenarios
  • More advanced options is to install SPFastDeploy VS addin allowing you to automatically save your files on app web
  • Another advanced technique (if you familiar with node.js and gulp) using gulp-spsave or gulp-spsync for automatically uploading files into SharePoint
1
  • thank you. This works great!! :) SPFastDeploy is a very good tool. It did not work at the beginning, but that was only becuase I used it with site that was root site. After I actually created site under domain/sites/[name of the site] everything started to work flawlessly.
    – Pedro
    Commented Dec 20, 2016 at 21:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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