bug when parsing the url with query string to .less

152 views
Skip to first unread message

bdaniel7

unread,
May 16, 2013, 6:22:29 AM5/16/13
to DotLess (Less Css for .NET)
Hi,

I'm using MVC 3 with razor and dotless like this:

<link media="screen" href="@Url.ContentWithVersion("~/Content/
simulation.less")" rel="stylesheet" type="text/css" />

To prevent caching, I'm using a custom Url.ContentWithVersion that
appends the date and time of the last modification to the path.
So the final url for simulation.less is
http://localhost:3608/Content/simulation.less?v=20130516_101145

But I get this error in browser:

directive block with unrecognised format on line 1 in file '/Content/
simulation.less':
[]: /beginning of file
[1]: @v: 20130516_101145;
^
[2]: /* Simulations */

where line [2] in the error is actually the very first line in
the .less file.
When I use the default @Url.Content(), there's no error.

bdaniel7

unread,
May 30, 2013, 6:08:06 AM5/30/13
to DotLess (Less Css for .NET)
Is there anything happening regarding this bug?
Should I enter it in a tracker?

On May 16, 1:22 pm, bdaniel7 <bdani...@gmail.com> wrote:
> Hi,
>
> I'm using MVC 3 with razor and dotless like this:
>
> <link media="screen" href="@Url.ContentWithVersion("~/Content/
> simulation.less")" rel="stylesheet" type="text/css" />
>
> To prevent caching, I'm using a custom Url.ContentWithVersion that
> appends the date and time of the last modification to the path.
> So the final url for simulation.less ishttp://localhost:3608/Content/simulation.less?v=20130516_101145
Reply all
Reply to author
Forward
0 new messages