I want to build a sharepoint hosted app that will use as master page the default app.master.

That means that I want to deploy my custom master (slight changes) with the app and use it only inside my app. Also I want that no matter changes the user makes to the host web (changing the theme or master page) it should not affect my app the way it looks.

I followed this article here:


but when I change the look and feel of the host web the app web look and feel changes also ... quite don't understand it as it should not because it's using my custom master page that is based on default app.web ...

Any ideas how I can achieve this? Thanks!

2 Answers 2


Although I've not tried this, I think it may be possible.

Check your custom Pages if they're dynamically injecting "defaultcss.ashx" which is a asp.net handler to retrieve css. If you're using anything as such, try commenting that JS code, you may have to load the default core css in your master page directly such as:

<link href="/_layouts/15/1033/styles/corev15.css" type="text/css" rel="stylesheet">

If the above doesn't help, from your custom master page (custom.app.master), comment out the

<SharePoint:CssLink.... > and <SharePoint:CssRegistration.....> (try one first then other and then both) and include the direct reference to CSS using the above mentioned html link tag.

You cannot do this with a SharePoint-hosted app. SharePoint-hosted apps will use the master page of the site they are hosted in. This works the same with SharePoint application pages and other custom stuff.

You can, however, do this in an auto-hosted or provider-hosted app as those run outside of the SharePoint stack.

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.