Documentation

Upgrading from Cassette v1 to v2

Cassette v2 feature an all-new plug-in system and number of changes to the configuration API. Please follow these steps to upgrade from v1 to v2.

  1. Uninstall all Cassette nuget packages from your web application.
  2. Install the Cassette.Aspnet nuget package
  3. Change your CassetteConfiguration class to look like this:
    using Cassette;
    public class CassetteConfiguration : IConfiguration<BundleCollection>
    {
        public void Configure(BundleCollection bundles)
        {
            // Call bundles.Add methods here, same as in v1
        }
    }
  4. If you want to configure CassetteSettings then create another class that implements IConfiguration<CassetteSettings>.
  5. If using CoffeeScript, Less, Sass, etc, install the plug-ins you require.
  6. Use the new bundle customization APIs. For example, to enable embedding images in CSS as data-URIs:
    bundles.Add<Stylesheet>("styles", b => b.EmbedImages());

Other changes

The diagnostic page that used to be at /_cassette is now at /cassette.axd.

Cassette v2 uses SimpleJson instead of Newtonsoft.Json. This affects the Bundles.AddPageData method. The noteable difference is in JSON date formatting. SimpleJson defaults to using ISO 8601 date format.

If you run into problems upgrading, please ask for help in the Cassette Google Group.