I'm getting errors when deploying a site to my server, the sites works fine of my local machine.
None of the XSLT files are rendering (Error parsing XSLT file: \)
If I try to save an XSLT file in the back end I get the error below.
System.Exception: Unable to load one or more of the types in assembly 'RazorEngine.Templates, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. Exceptions were thrown: System.IO.FileNotFoundException: Could not load file or assembly 'System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified. System.IO.FileNotFoundException: Could not load file or assembly 'System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified. at umbraco.BusinessLogic.Utils.TypeFinder.FindClassesMarkedWithAttribute(Assembly assembly, Type attribute) at umbraco.BusinessLogic.Utils.TypeFinder.FindClassesMarkedWithAttribute(Type attribute) at umbraco.macro.GetXsltExtensionsImpl() at umbraco.cms.businesslogic.cache.Cache.GetCacheItem[TT](String cacheKey, Object syncLock, CacheItemPriority priority, CacheItemRemovedCallback refreshAction, CacheDependency cacheDependency, TimeSpan timeout, GetCacheItemDelegate`1 getCacheItem) at umbraco.macro.GetXsltExtensions() at umbraco.macro.AddMacroXsltExtensions() at umbraco.presentation.webservices.codeEditorSave.SaveXslt(String fileName, String oldName, String fileContents, Boolean ignoreDebuggin
I have other Umbraco 4.7 sites running fine on the same server.
Sure I saw a similar post recently but can't find it.
I have the same problem, except the error only shows up when you first visit the site after an application pool recycle. After that it doesn't show until the next recycle.
Why this happens I am not sure, but I'm going to try to install MVC2 and 3 on the server and see if that helps (it should). However, maybe including the System.Web.Mvc (v2.0) dll in the bin folder would be enough? It's a bit confusing as Razor was built into MVC3, not 2, so I'm not sure why you'd need to have 2 in there.
Just encountered this issue on my development site which is based on a build of 4.7.1 Indeed, RazorEngine.Templates has a reference to System.Web.MVC which is not part of the umbraco distribution.
This fault will also prevent RazorDataTypeModels from working (which is how I got onto the issue) and probably extension methods on DynamicNode etc because we have to instantiate all the types, and if one of them is missing a dependency, then that fails.
For me, I just renamed RazorEngine.Templates as RazorEngine.Templates.dll.ignore and everything started working, Despite the name, RazorEngines.Templates is a CodePlex project [http://razorengine.codeplex.com/] but I'm not sure which package installed it in my dev site.
I've added (a lot of) tracing to my local macroEngines that shows up in umbDebugShowTrace to debug RazorDataTypeModel faults, as this is one of the flagship features of 4.7.1
I'm not sure if I'll commit these traces, it makes the trace output very noisy.
As Sebastiaan suggests, installing MVC2 or MVC3 will fix the issue, but you can also remove the DLL if you're not using it
Unable to load 'RazorEngine.Templates'
Hey,
I'm getting errors when deploying a site to my server, the sites works fine of my local machine.
None of the XSLT files are rendering (Error parsing XSLT file: \)
If I try to save an XSLT file in the back end I get the error below.
System.Exception: Unable to load one or more of the types in assembly 'RazorEngine.Templates, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. Exceptions were thrown:
System.IO.FileNotFoundException: Could not load file or assembly 'System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
System.IO.FileNotFoundException: Could not load file or assembly 'System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
at umbraco.BusinessLogic.Utils.TypeFinder.FindClassesMarkedWithAttribute(Assembly assembly, Type attribute)
at umbraco.BusinessLogic.Utils.TypeFinder.FindClassesMarkedWithAttribute(Type attribute)
at umbraco.macro.GetXsltExtensionsImpl()
at umbraco.cms.businesslogic.cache.Cache.GetCacheItem[TT](String cacheKey, Object syncLock, CacheItemPriority priority, CacheItemRemovedCallback refreshAction, CacheDependency cacheDependency, TimeSpan timeout, GetCacheItemDelegate`1 getCacheItem)
at umbraco.macro.GetXsltExtensions()
at umbraco.macro.AddMacroXsltExtensions()
at umbraco.presentation.webservices.codeEditorSave.SaveXslt(String fileName, String oldName, String fileContents, Boolean ignoreDebuggin
I have other Umbraco 4.7 sites running fine on the same server.
Sure I saw a similar post recently but can't find it.
Any ideas?
Rich
For reference, I've resolved this, though don't really know exactly what fixed it.
I deleted all the dlls, copied over all the dlls from a clean 4.7 install across, recopied my 3rd party / custom dlls and it started working.
Rich
I have the same problem, except the error only shows up when you first visit the site after an application pool recycle. After that it doesn't show until the next recycle.
Why this happens I am not sure, but I'm going to try to install MVC2 and 3 on the server and see if that helps (it should). However, maybe including the System.Web.Mvc (v2.0) dll in the bin folder would be enough? It's a bit confusing as Razor was built into MVC3, not 2, so I'm not sure why you'd need to have 2 in there.
I had something similar a while ago. I think it was because System.Web.Razor was not referenced. I'm not sure if that is the same issue though.
Hmmm, it's just a plain vanilla umbraco site though, no custom code. Just a simple Razor script.
FYI it was indeed solved by installing MVC2 and 3 on the server, the error is gone now.
Just encountered this issue on my development site which is based on a build of 4.7.1
Indeed, RazorEngine.Templates has a reference to System.Web.MVC which is not part of the umbraco distribution.
This fault will also prevent RazorDataTypeModels from working (which is how I got onto the issue) and probably extension methods on DynamicNode etc because we have to instantiate all the types, and if one of them is missing a dependency, then that fails.
For me, I just renamed RazorEngine.Templates as RazorEngine.Templates.dll.ignore and everything started working, Despite the name, RazorEngines.Templates is a CodePlex project [http://razorengine.codeplex.com/] but I'm not sure which package installed it in my dev site.
I've added (a lot of) tracing to my local macroEngines that shows up in umbDebugShowTrace to debug RazorDataTypeModel faults, as this is one of the flagship features of 4.7.1
I'm not sure if I'll commit these traces, it makes the trace output very noisy.
As Sebastiaan suggests, installing MVC2 or MVC3 will fix the issue, but you can also remove the DLL if you're not using it
Gareth
is working on a reply...