4

We got a MVC project running and we seem to have problem refreshing .less files without actually recycling the pool.

If it was just me, I would not bother with this since everytime I compile, the pool recycle. But, our web integrator doesn't like to rebuild since he doesn't even work within Visual Studio when changing the .less files.

Here's what I do:

  • Got SquishIt from Nuget to the latest version;
  • Calling Bundle.Css().Add(...).Render() in the Layout.cshtml;
  • The csproj is set to compile in debug mode (Configuration Manager);
  • Got in the Web.config file.

I look at almost all entries on the codethinked.com web site and couldn't find what I was looking for. Some people seems to have problems, but not with the file not being regenerated.

Thanks!

tereško
  • 58,060
  • 25
  • 98
  • 150
Allov
  • 1,308
  • 1
  • 13
  • 23

3 Answers3

3

Had an answer from Justin Etheredge on google groups. It's going to be fixed in the version 0.8.3.

http://groups.google.com/group/squishit/browse_thread/thread/6643663dda433a68

Allov
  • 1,308
  • 1
  • 13
  • 23
1

Try using ForceRelease after your call to .Add

Like this:

.Add("~/Content/lessfiles/site.less")
.ForceRelease()
.Render("~/Content/combined_site_#.css")

After you make the change to include ForceRelease, do your pool recycle once more to make sure you are looking at a fresh file.

Finally, change your .less file with notepad behind the scenes.
The next refresh of the page should pick the change up.

Kevin Radcliffe
  • 991
  • 1
  • 11
  • 21
  • Unfortunatly, we already tried that and it doesn't work :/ I'm not sure what's going on. – Allov Nov 23 '11 at 19:21
0

While not a good solution for production, I found running IISReset locally(if you are running through IIS) to be a good way to force squishit to recognize changes.

AaronLS
  • 37,329
  • 20
  • 143
  • 202