Is there anything you kneed to do differently in Umbraco to make bundling work? I keep doing the same procedure that I always do (add the bundle in BundleConfig.cs, register that bundle in Global.asax and render it in the view) but I can't get it to work.
Could not load file or assembly 'WebGrease, Version=1.5.1.25624, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
I added WebGrease via NuGet and the lines below to web.config but it still throws the same error. Any clue why?
We struggling with the same issue, bundles isn't easy to implement in the Umbraco projects, can you provide some details how to setup Cruncher quickly ?
We stopped using Cruncher. The only reason for that is that we don't want to do the bundling server side. Instead our frontenders already bundle and minify it with gulp. That way we only need to include those files and don't need to do anything in Razor or C#.
MVC Bundling in Umbraco 7
Is there anything you kneed to do differently in Umbraco to make bundling work? I keep doing the same procedure that I always do (add the bundle in BundleConfig.cs, register that bundle in Global.asax and render it in the view) but I can't get it to work.
Comment author was deleted
Try doing it with an ApplicationEventHandler (add bundles on application started) http://our.umbraco.org/documentation/Reference/Events/application-startup
Or you can also give this package a try: http://our.umbraco.org/projects/developer-tools/optimus
Are you suggesting something like this?
public class RegisterEvents : ApplicationEventHandler
{
protected override void ApplicationStarted(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext)
{
BundleConfig.RegisterBundles(BundleTable.Bundles);
}
}
Comment author was deleted
@Peter yup
I tried it but it gives me the error message:
Could not load file or assembly 'WebGrease, Version=1.5.1.25624, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
I added WebGrease via NuGet and the lines below to web.config but it still throws the same error. Any clue why?
<dependentAssembly>
<assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.5.1.25624" newVersion="1.5.1.25624" />
</dependentAssembly>
Comment author was deleted
Sure it's that version of WebGrease that is installed v1.5.1.25624 ?
Nope! :) I checked meanwhile I was waiting for your reply and it was a new version. Thanks for all your help!
Comment author was deleted
Great, glad it's sorted :)
Hello,
I used bundling too, but now I'm using Cruncher. It works much easier and also supports external sources.
Jeroen
Hi Jeroen,
We struggling with the same issue, bundles isn't easy to implement in the Umbraco projects, can you provide some details how to setup Cruncher quickly ?
Thanks, Alex
Why did you prefer Cruncher against Optimus? What is better in performance ?
Thank,
Alex
Hello,
We stopped using Cruncher. The only reason for that is that we don't want to do the bundling server side. Instead our frontenders already bundle and minify it with gulp. That way we only need to include those files and don't need to do anything in Razor or C#.
Jeroen
Thanks, Jeroen, it makes sense.
is working on a reply...