我用Ajaxmin 4.96.4941安装了squishit版本0.9.8.2。问题是,当我运行ASP.net网站时,我收到错误
[FileLoadException: Could not load file or assembly 'AjaxMin, Version=4.48.4489.28432, Culture=neutral, PublicKeyToken=21ef50ce11b5d80f' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)]
SquishIt.Framework.Minifiers.JavaScript.MsMinifier.Minify(字符串内容)在c:\ dev \ urandom \ SquishIt \ SquishIt.Framework \ Minifiers \ JavaScript \ MsMinifier.cs:31
SquishIt.Framework.Base.BundleBase 1.MinifyIfNeeded(String content, Boolean minify) in c:\dev\urandom\SquishIt\SquishIt.Framework\Base\BundleBase.Rendering.Internals.cs:340
System.Linq.WhereSelectArrayIterator
2.MoveNext()+110
System.Linq.d__16 2.MoveNext() +348
System.Collections.Generic.List
1..ctor(IEnumerable 1 collection) +476
System.Linq.Enumerable.ToList(IEnumerable
1来源)+69
SquishIt.Framework.JavaScript.JavaScriptBundle.AggregateContent(List 1 assets, StringBuilder sb, String outputFile) in c:\dev\urandom\SquishIt\SquishIt.Framework\JavaScript\JavaScriptBundle.cs:84
SquishIt.Framework.Base.BundleBase
1.GetMinifiedContent(List 1 assets, String outputFile) in c:\dev\urandom\SquishIt\SquishIt.Framework\Base\BundleBase.Rendering.Internals.cs:333
SquishIt.Framework.Base.BundleBase
1.RenderRelease(String key,String renderTo,IRenderer renderer)在c:\ dev \ urandom \ SquishIt \ SquishIt .Framework \基地\ BundleBase.Rendering.Internals.cs:290
答案 0 :(得分:0)
我认为4.96在某些时候存在问题,但不记得到底是什么。您是否尝试过添加绑定重定向?
我建议更新到4.97.4951.28483(或使用YUI minifier)。
对于后者,在global.asax.cs中的某个地方(在进行任何包渲染之前)
Bundle.ConfigureDefaults().UseYuiForJsMinification()