Bundling Not Working when deployed

If you deploy an MVC site to a server that DOESN’T have the full MVC package installed (e.g. you just want to copy the binaries with your site) then bundling will not work correctly.

To expand on this the page simply will not render the css or scripts but if you look at the source HTML the actual bundled scripts are written correctly – it’s as if the actual ‘files’ they relate to don’t actually exist.

This fix is to simply ensure the system.web.optimisation.dll has copied to your site bin folder and then add the following to your web.config:


<remove name=”BundleModule” />

<add name=”BundleModule” type=”System.Web.Optimization.BundleModule” />



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s