Cannot add or save XSLT file due to missing System.Web.MVC reference?
Hello,
I get the same "missing assembly reference" error in two situations and I don't know why, because I am not using either recaptcha or MVC.
1. When I try to add a new XSLT file.
- right-click the XSLT older, - choosing create, - type a name - choose the 'clean' template - and click create
2. When saving and existing XSLT file
System.Exception:
Unable to load one or more of the types in assembly 'Recaptcha,
Version=1.0.5.0, Culture=neutral, PublicKeyToken=9afc4d65b28c38c2'.
Exceptions were thrown:
System.IO.FileNotFoundException: Could not load file or assembly
'System.Web.Mvc, Version=1.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 ignoreDebugging)
Cannot add or save XSLT file due to missing System.Web.MVC reference?
Hello,
I get the same "missing assembly reference" error in two situations and I don't know why, because I am not using either recaptcha or MVC.
1. When I try to add a new XSLT file.
- right-click the XSLT older,
- choosing create,
- type a name
- choose the 'clean' template
- and click create
2. When saving and existing XSLT file
System.Exception: Unable to load one or more of the types in assembly 'Recaptcha, Version=1.0.5.0, Culture=neutral, PublicKeyToken=9afc4d65b28c38c2'. Exceptions were thrown:
System.IO.FileNotFoundException: Could not load file or assembly 'System.Web.Mvc, Version=1.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 ignoreDebugging)
<xsl:variable name=”minLevel” select=”1”/>
<xsl:template match=”/”>
<xsl:if test=”$currentPage/@level > $minLevel”>
<ul>
<xsl:for-each select=”$currentPage/ancestor::* [@level > $minLevel and string(umbracoNaviHide) != ‘1’]”>
<li>
<a href=”{umbraco.library:NiceUrl(@id)}”>
<xsl:value-of select=”@nodeName”/>
</a>
</li>
</xsl:for-each>
<!-- print currentpage -->
<li>
<xsl:value-of select=”$currentPage/@nodeName”/>
</li>
</ul>
</xsl:if>
</xsl:template>
This problem is described here as well:
http://our.umbraco.org/projects/website-utilities/xsltsearch/xsltsearch-bugs/16139-Error-when-saving-XSLT-file-in-Umbraco-46-beta?p=2
Is solved it by removing recaptcha.dll from the bin directory.
Note you can also solve by adding a reference in your web.config (or using an older version of Recaptcha). See http://our.umbraco.org/forum/developers/xslt/19383-referencing-catcha-dll-breaks-xslt
Okey Dokey,
I hit this error on .net 4 running Umbraco 4.7.1.1.
This is the full runtime node so you can get a bit more context but I only had to add the last dependentAssembly node and it was fixed.
Cheers
is working on a reply...