0

Simple example: if I write in less-file so:

h1 {
  color: #25d14d;
 }

in css I get:

h1 {
   color: #25d14d;
   }

But if I write:

@color: #25d14d;
 h1 {
   color: @color;
 }

I get:

/*
   Compile Error. 
   See error list for details
*/

I've read a lot of information, but none of those solutions helped.

I reset my VS 2012, reset Web Essentials, installed ASP.NET and Web Tools 2012.2. and ... nothing changed.

I am in despair... How to get to work LESS with Web Essentials in VS 2012?

Val Yar
  • 5
  • 3
  • it's always a good idea to try to compile your LESS on independent box: http://winless.org/online-less-compiler. It is compiled just fine there, so the problem is your box not LESS. – Alex M Aug 17 '13 at 18:26

1 Answers1

1

You can try the following workaround - start your .less file with valid CSS code, for example

h1 {}

and below put your LESS code:

@color: #25d14d;
 h1 {
   color: @color;
 }

I've faced the same problem and that helped me unexpectedly.

Mike P.
  • 26
  • 2
  • Thank you for your response. I can not check whether it is working. Because it worked after updating the Windows. – Val Yar Aug 16 '13 at 08:46