In the Windows Azure Publish Settings I have selected:
Environment: Production
Build Configuration: Release
In my Web.Release.config I have:
<system.web>
<compilation xdt:Transform="RemoveAttributes(debug)" />
I had bundling working before and I made no code changes that I know of. However now
when I publish to the cloud and view web pages it seems there is no bundling at all.
All the javascript and CSS are downloaded one by one.
Is there something I am missing? This used to work and now it seems not to work at
all.
Do I need to explicitly set the following:
<compilation debug="false" targetFramework="4.0">
Or this:
public static void RegisterBundles(BundleCollection bundles) {
...
...
BundleTable.EnableOptimizations = true;
}
Note that when I added the above line I got a message saying: EnableOptimizations is a property but is used like a type.
Set debug to false in web config
And it should work as expected!
Oh, one more thing:
Overrides Web.Config settings, so if this is set to true and Web.Config is set to debug it should work as well.
If you want to use that, check that you actually added BundleTable… in the right place, like this:
EDIT: Including a working BundleConfig for reference