Automatic upload of app content to SharePoint Online

This is a more of a tip, what I find very useful in development of SharePoint Apps in Visual Studio and I wish someone told me at the beginning, when I started.

When developing a SharePoint-hosted app, debug mode in Visual Studio offers great feature, which enables you to change content of your aspx page, js files, css styles and after saving, the content is automatically uploaded to the SharePoint environment, so you can test it immediately in the browser and still stay in debug mode. So there is no need for small changes to redeploy it.

Following picture shows, that after saving in the debug mode, the content was succesfully uploaded to SharePoint Online.

sp_app_visualStudio_upload

Changes of other file types, ie. SharePoint definition files (elements.xml, features, etc.) are not propagated, for this you need to redeploy it again.

Typescript issue

What I am still trying to figure out (and hoping guys watching stackoverflow will help me) is how to make it work with other file types, for example Typescript files.

After saving Typescript file, JS file is automatically re-generated , but this JS file and TS file are not uploaded to the server. It can be partially solved by manually changing content in JS file to trigger automatic upload to SharePoint, however I couldn’t find a way to upload TS file.

Leave a Reply

Your email address will not be published. Required fields are marked *