I'm developing a SharePoint feature, I already know where to put custom layouts and templates, but can't find helps where to put .css styles.

I'm not asking how to reference an existing file in any (master)page, I'm looking for the correct way to add a css file in my project in order it gets deployed with the other files.

This is my Strusture:
enter image description here

I tried with the Styles folder, but during the deploy it seems to get ignored. Where should I put my ths css?

1 Answer 1


I would place it under the Layouts folder.

Project > Layouts > [solutionname] > Styles > cssfile.css

enter image description here

By placing it here Visual Studio automatically sets the Deployment Location and Deployment Type

enter image description here

This article has a good approach on howto place your files. SharePoint Farm Solution Project Structure

Also this article from Microsft explains how packaging and deployment works. Package and deploy SharePoint solutions

  • Nice, thanks. I put the <SharePoint:CssRegistration runat="server" name="ProjectName/cssFile.css" /> into my aspx file, no errors. However,it is not loaded...
    – Emaborsa
    Aug 13, 2018 at 11:47

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.