Upgrading to v6.0 causes: Error loading MacroEngine script (file: )
Originating from v4.7.1 - I incrementally upgraded all the way to v6.0. Everything seems to be working (verified after each upgrade...errors corrected before moving to next version) except at the very top of the page now, I get:
Error loading MacroEngine script (file: )
Using ?umbdebugshowtrace=true I see:
umbracoMacroError Loading Razor Script (file: ) [A]System.Web.WebPages.Razor.Configuration.HostSection cannot be cast to [B]System.Web.WebPages.Razor.Configuration.HostSection. Type A originates from 'System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' in the context 'Default' at location 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.WebPages.Razor\v4.0_1.0.0.0__31bf3856ad364e35\System.Web.WebPages.Razor.dll'. Type B originates from 'System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' in the context 'Default' at location 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.WebPages.Razor\v4.0_2.0.0.0__31bf3856ad364e35\System.Web.WebPages.Razor.dll'. at System.Web.WebPages.Razor.WebRazorHostFactory.CreateHostFromConfig(String virtualPath, String physicalPath) at System.Web.WebPages.Razor.RazorBuildProvider.GetHostFromConfig() at System.Web.WebPages.Razor.RazorBuildProvider.CreateHost() at System.Web.WebPages.Razor.RazorBuildProvider.get_Host() at System.Web.WebPages.Razor.RazorBuildProvider.EnsureGeneratedCode() at System.Web.WebPages.Razor.RazorBuildProvider.get_CodeCompilerType() at System.Web.Compilation.BuildProvider.GetCompilerTypeFromBuildProvider(BuildProvider buildProvider) at System.Web.Compilation.BuildProvidersCompiler.ProcessBuildProviders() at System.Web.Compilation.BuildProvidersCompiler.PerformBuild() at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath) at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) at System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean throwIfNotFound) at System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp) at System.Web.WebPages.BuildManagerWrapper.CreateInstanceOfType[T](String virtualPath) at System.Web.WebPages.VirtualPathFactoryManager.CreateInstanceOfType[T](String virtualPath) at System.Web.WebPages.WebPageBase.CreateInstanceFromVirtualPath(String virtualPath, IVirtualPathFactory virtualPathFactory) at umbraco.MacroEngines.RazorMacroEngine.ExecuteRazor(MacroModel macro, INode currentPage) at umbraco.MacroEngines.RazorMacroEngine.Execute(MacroModel macro, INode currentPage)
AND
macroError loading MacroEngine script (file: , Type: ''[A]System.Web.WebPages.Razor.Configuration.HostSection cannot be cast to [B]System.Web.WebPages.Razor.Configuration.HostSection. Type A originates from 'System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' in the context 'Default' at location 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.WebPages.Razor\v4.0_1.0.0.0__31bf3856ad364e35\System.Web.WebPages.Razor.dll'. Type B originates from 'System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' in the context 'Default' at location 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.WebPages.Razor\v4.0_2.0.0.0__31bf3856ad364e35\System.Web.WebPages.Razor.dll'. at umbraco.macro.renderMacro(Hashtable pageElements, Int32 pageId)
Config files have been updated / verified with WinMerge. I've reinstalled the latest Countour and the site seems to be functioning otherwise. Could it be an MVC version issue?
Hi Jan, just went through ALL config files again in /config and the web.config. Confirmed everything is identical.
...my bad. There was one line missed from WinMerge ... and I initially missed it due to the comments and additions in the original web.config, made it look a bit convoluted in WinMerge _
Upgrading to v6.0 causes: Error loading MacroEngine script (file: )
Originating from v4.7.1 - I incrementally upgraded all the way to v6.0. Everything seems to be working (verified after each upgrade...errors corrected before moving to next version) except at the very top of the page now, I get:
Using ?umbdebugshowtrace=true I see:
AND
Config files have been updated / verified with WinMerge. I've reinstalled the latest Countour and the site seems to be functioning otherwise. Could it be an MVC version issue?
Thanks!
My Razor version has changed from 4.9.X to 6.0. In the 6.0 config the razor version is 2.0.0.0
Thanks for the reply Niels, my config states the identical . I currently don't use Razor on this site actually, all customization is via XSLT.
Hi Sean
Did you also remember to merge the config files in the config folder? And did you also merge the changes in the web.config file?
/Jan
Hi Jan, just went through ALL config files again in /config and the web.config. Confirmed everything is identical.
...my bad. There was one line missed from WinMerge ... and I initially missed it due to the comments and additions in the original web.config, made it look a bit convoluted in WinMerge _
Lesson learned == DOUBLE CHECK CONFIG FILES! .. thanks! ;)
Hi Sean
I am having a similiar problem. I have rebuilt my old stite which was in 4.10.1. I started with a blank ver 6 site and added back in my content etc..
But I am also getting the same error for my razor scropts and my user controls.
Can I ask what line you missed out?
Thanks
is working on a reply...