1

I have migrated some site collections from a SP2010 farm to SP2013 farm. I have fully upgraded a site to SP2013 mode. In the Master file I have code like below:

<SharePoint:CssRegistration name="/_layouts/mycompany/develop/styles/style.css" runat="server" after="SharepointCssFile"/>

By some reason, above line actually refer to \Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\ not \Microsoft Shared\Web Server Extensions\15\TEMPLATE\LAYOUTS\

I have tried modified to:

<SharePoint:CssRegistration name="/15/_layouts/mycompany/develop/styles/style.css" runat="server" after="SharepointCssFile"/>

But it still refer to \14\ path. I have tested remove the \14\ path css files and all style will be gone.

Although I can work on the style sheets (CSS files) at \14\ path, I am worrying it will cause some conflict in future. Are there some configure I overlook? Please share your experience. Thank you!

1 Answer 1

4

You have to change the file path like if you want to refer from 15 hive,

<SharePoint:CssRegistration name="/_layouts/15/mycompany/develop/styles/style.css" runat="server" after="SharepointCssFile"/> 

It would not cause any issues if you refer it from 14 hive. But it would be better if you move it to 15 hive as all other stuffs related to Sharepoint 2013 is in 15 hive.

2
  • May I know is the /15/ part a MUST for SP2013 setup? Can I get rid of /14/ /15/?
    – Mark L
    Jun 4, 2014 at 3:38
  • If you are using 15 hive for your file, then you have to use this 15 hive part. Otherwise you can use site assets or Style library for your branding files. These are the two options.
    – Aanchal
    Jun 4, 2014 at 3:41

Your Answer

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

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