Question

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!

Was it helpful?

Solution

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

OTHER TIPS

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.

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top