Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Aug 06, 2012 02:53 PM by plippard
Jul 31, 2012 03:04 AM|LINK
I am using the BETA2 ASP.NET Bundling & Optimization....System.Web.Optimization
I am attempting to bundle "Less" style sheets....as outlined in the excellent article.... http://www.asp.net/mvc/tutorials/mvc-4/bundling-and-minification
If I have an "@import" command at the beginning of two Less files (because they share variables) ....this recommended implementation will not work.....I get a runtime exception that says the file specified in the @import command cannot be found. I have
tried specifying the file with an absolute path as well as simply the file name.
Any ideas on how I can adjust the recommended Less file implementation so Less files will work ?
Aug 06, 2012 05:26 AM|LINK
Just update your Less transform as given here,
public class LessTransform : IBundleTransform
public void Process(BundleContext context, BundleResponse response)
var oldPath = Directory.GetCurrentDirectory();
response.Content = dotless.Core.Less.Parse(response.Content);
response.ContentType = "text/css";
More information at here.
Aug 06, 2012 02:53 PM|LINK
I found this code on the Internet which provides a more comprehensive solution.