Domanda

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?

È stato utile?

Soluzione

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

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a sharepoint.stackexchange
scroll top