Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • julius 107 posts 289 karma points
    Dec 29, 2011 @ 00:17
    julius
    0

    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 &gt; $minLevel”>
          <ul>
            <xsl:for-each select=”$currentPage/ancestor::* [@level &gt; $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>

     

  • julius 107 posts 289 karma points
    Dec 29, 2011 @ 00:38
    julius
    0

    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.

     

     

  • Tom Fulton 2030 posts 4998 karma points c-trib
    Dec 29, 2011 @ 14:28
    Tom Fulton
    0

    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

  • Ben Norman 167 posts 276 karma points
    Feb 24, 2012 @ 00:32
    Ben Norman
    0

    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.

      <runtime>
        <!-- Old asp.net ajax assembly bindings -->
        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
          <dependentAssembly>
            <assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35" />
            <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="4.0.0.0" />
          </dependentAssembly>
          <dependentAssembly>
            <assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35" />
            <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="4.0.0.0" />
          </dependentAssembly>
          <dependentAssembly>
            <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35"/>
            <bindingRedirect oldVersion="1.0.0.0" newVersion="3.0.0.0"/>
          </dependentAssembly>
        </assemblyBinding>
      </runtime>

    Cheers

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies