Adrogans
Adrogans

Reputation: 53

Where do I put .less files in my Visual Studio Web Application?

I want to include a .less file in my Visual Studio Web Forms Application. I am running on the default template for VS 2015. Just wondering which folder to put the .less file in, and where I need to reference it (if at all). Currently all .css files are in the "Content" folder - should I just add it in there?

Please let me know if that's not enough information to go on.

Thanks!

Upvotes: 2

Views: 1203

Answers (2)

NinjaDeveloper
NinjaDeveloper

Reputation: 1712

for me and my team projects we use "Content" host sub folder for .less file and compiled CSS. when we compile .less file to CSS using gulp or grunt we output file to "CSS" or "Style" folder. you can create Grunt or gulp task to compiled file to CSS or style folder. this is npm package to compile less to CSS https://www.npmjs.com/package/gulp-less

>Content
---->/LESS
---->/CSS/Style 

Upvotes: 1

Lee Harris
Lee Harris

Reputation: 541

You will only need .less files when building your CSS. I would suggest a folder you don't plan on deploying to your website. You will only need to include the CSS files that are generated in your Content folder.

I've organized my directories as /Content for CSS and /src for any source files. When I publish to the website I only include the /Content folder. All references should be to the CSS file.

Root
 /Content (CSS)
 /src (less)

Upvotes: 1

Related Questions