views:

265

answers:

4

I've found http://lesscss.org/ so interesting! It is a good way to improve reuse of elements in css, but I don't know how to integrate it with Visual Studio 2008. (it would fit nicely with asp.net MVC, for sure)

Do you have any idea for what I need to do in order to recognize and compile .less files inside VS?

A: 

Integration beyond simply being able to invoke an external command line based tool would be a significant task. For simple integration consider using the following guide to write a task which invokes the lessc compiler on the file.

Integration at the intellisense level is a massive undertaking for someone not deeply experienced with both the css/less syntax and the visual studio api.

ShuggyCoUk
Yes it is, we are on with it now, and its not fun.
Owen
you doing it for 2010 or 2008? the editor changes in 2010 sound pervasive...Mind saying what you are integrating?
ShuggyCoUk
+2  A: 

I'm using compass css, instead of less, but it should be the same. Just add the appropriate command line option to the "Post Build Event" line in the project configuration.

SztupY
+5  A: 

http://nlesscss.codeplex.com/ - My attempt at playing around with Less for .NET.

EDIT: We now have a new home for the .NET Less Css Port - www.dotlesscss.com, enjoy.

Owen
Great, man ;) I'll try it at home!
Victor Rodrigues
No worries. It works OK now, but its not totally without issues. Feel free to add your bugs to code plex or contact me at the email provided there.
Owen
+1  A: 

For me the solution was to use *.css in handler and it works fine.

<add type="dotless.Core.LessCssHttpHandler, dotless.Core" validate="false" path="*.css" verb="*" />
Ondrej