BundleTransformer.Core throwing implementation exception

1.2k Views Asked by At

I'm trying to use BundleTransformer.Core and BundleTransformer.Less, however I've run into the following exception when trying to setup MVC4 bundles using the recommended code:

Method 'OrderFiles' in type 'BundleTransformer.Core.Orderers.NullOrderer' does not have an implementation.

That exception is thrown on registering the following:

public static void RegisterBundles(BundleCollection bundles)
{
    var cssTransformer = new CssTransformer();
    var jsTransformer = new JsTransformer();
    var nullOrderer = new NullOrderer();

    var commonStylesBundle = new Bundle("~/Bundles/CommonStyles");
    commonStylesBundle.Include("~/Styles/V3/functions.less",
                               "~/Styles/V3/helpers.less",
                               "~/Styles/V3/media-queries.less",
                               "~/Styles/V3/normalize.less",
                               "~/Styles/V3/print.less",
                               "~/Styles/V3/style.less");
    commonStylesBundle.Transforms.Add(cssTransformer);
    commonStylesBundle.Orderer = nullOrderer;

    bundles.Add(commonStylesBundle);
}

I have tried both the latest versions of BundleTransformer.Core and the immediate prior version.

1

There are 1 best solutions below

1
On BEST ANSWER

It seems that you have installed preview version of the Microsoft ASP.NET Web Optimization Framework (1.1.0 Alpha1 or 1.1.0 Beta1). At the moment, the Bundle Transformer supports only RTM-version of the Microsoft ASP.NET Web Optimization Framework (version 1.0.0). I recommend that you roll back to RTM-version.