I added a basic inline Razor (C#) macro to my template and the page is now having problems rendering and is showing this error in the trace log:
Error loading MacroEngine script (file: , Type: '' No MacroEngine found for extension 'cshtml' at umbraco.cms.businesslogic.macro.MacroEngineFactory.GetByExtension(String extension) at umbraco.macro.loadMacroScript(MacroModel macro) at umbraco.macro.renderMacro(Hashtable pageElements, Int32 pageId)
Here is the macro in my template:
<umbraco:Macro runat="server" language="cshtml"> <h1>Hello, world... from Macro</h1> </umbraco:Macro>
I am running Umbraco 4.11.1.
Any help you can provide will be greatly appreciated.
This appears to be a bug with Umbraco 4.11.1 as I followed the standard setup and simply added the Business Starter Kit. Here is what I did to solve the problem:
edited config\umbracoSettings.config and changed js,xmlto js,xml,cshtml
touched \web.config (opened, added a space, saved, removed space, re-saved)
touched \global.asax (opened, added a space, saved, removed space, re-saved)
This solved the issue with my inline C#/Razor script running inside a template. This also fixed another problem that caused the "Choose a language" dropdown to be empty when creating a new script file under "Umbraco > Developer > Scripting Files > Create".
Hopefully this information may be of some help to you.
No MacroEngine found for extension 'cshtml'
Greetings,
Hoping someone can help.
I added a basic inline Razor (C#) macro to my template and the page is now having problems rendering and is showing this error in the trace log:
Error loading MacroEngine script (file: , Type: ''
No MacroEngine found for extension 'cshtml'
at umbraco.cms.businesslogic.macro.MacroEngineFactory.GetByExtension(String extension)
at umbraco.macro.loadMacroScript(MacroModel macro)
at umbraco.macro.renderMacro(Hashtable pageElements, Int32 pageId)
Here is the macro in my template:
<umbraco:Macro runat="server" language="cshtml">
<h1>Hello, world... from Macro</h1>
</umbraco:Macro>
I am running Umbraco 4.11.1.
Any help you can provide will be greatly appreciated.
Thank you,
David
Fixed the problem.
This appears to be a bug with Umbraco 4.11.1 as I followed the standard setup and simply added the Business Starter Kit. Here is what I did to solve the problem:
is working on a reply...