Copied to clipboard

Flag this post as spam?

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


  • Ryan Langton 13 posts 33 karma points
    Jul 19, 2014 @ 23:21
    Ryan Langton
    0

    Upgrading from 7.0.4 to 7.1.4

    Hello,

    I have upgraded from umbraco 7.0.4 to 7.1.4 and get the following error on Html.RenderPartial("umbHomepageBanner")

    c:\Users\rlang_000\AppData\Local\Temp\Temporary ASP.NET Files\root\82d23171\1a791aba\App_Web_umbhomepagebanner.cshtml.89207646.m9qj3m2h.0.cs(27): error CS0246: The type or namespace name 'UmbracoTemplatePage' could not be found (are you missing a using directive or an assembly reference?)

    I followed the instructions using nuget, shown here:

    http://our.umbraco.org/documentation/installation/upgrading/general

    I have tried clearing my AppData\Local\Temp folder.  Same results.  

    Please help.  This upgrade has been very painful so far.

  • John Churchley 272 posts 1258 karma points c-trib
    Jul 19, 2014 @ 23:30
    John Churchley
    0

    Tried changing it to just Html.Partial?

  • Ryan Langton 13 posts 33 karma points
    Jul 20, 2014 @ 00:50
    Ryan Langton
    0

    Yes I've tried that.  The problem is with UmbracoTemplatePage now missing.

    Which makes no sense because I can see it in \packages\UmbracoCms.Core.7.1.4\lib\umbraco.dll

  • John Churchley 272 posts 1258 karma points c-trib
    Jul 20, 2014 @ 10:32
    John Churchley
    0

    You might of tried these but:

    • Check you have only have on @inherits Umbraco.Web.Mvc.UmbracoTemplatePage at the top of the partial view
    • Did you recycled the application pool? - after clearing you tempary folder 
    • Rebuild the solution a couple of times

    Hope one of these help. Sound like your on the right track already (i.e. deleting TEMP)

  • Ryan Langton 13 posts 33 karma points
    Jul 23, 2014 @ 02:42
    Ryan Langton
    0

    Tried all suggestions here and everything else I can think of.  Nothing is working.  Probably going to have to just roll back to 7.0.4 :(

  • Robert Foster 446 posts 1751 karma points MVP admin c-trib
    Jul 23, 2014 @ 05:02
    Robert Foster
    0

    Hi Ryan,

    perhaps the best solution might be to remove the umbraco dll's and /umbraco* folders, and reinstall umbraco 7.1.4.

    How did you install it in the first place?  Did you use the NuGet packages in Visual Studio, or some other method?

    - Rob.

  • Robert Foster 446 posts 1751 karma points MVP admin c-trib
    Jul 23, 2014 @ 05:09
    Robert Foster
    0

    Should have read the comments more thouroughly - it looks like you're using Nuget - have you tried removing the UmbracoCMS package (and it's dependencies) and reinstalling it?  Also, make sure that your references contains pointers to the correct versions.

    You could also remove any old packages from the package directory that may be interfering with it, and double check your web.config file in the /Views directory and make sure it contains the references to the correct dlls (although this shouldn't be necessary).

    - Rob.

  • Ryan Langton 13 posts 33 karma points
    Jul 23, 2014 @ 13:36
    Ryan Langton
    0

    I removed everything through nuget.  When I was done there were 0 installed packages.  I deleted the packages folder manually as well (still had some Asp.net folders).  So this was essentially a clean installation from scratch.  After the re-install, I get the same error.  Beginning to think this is a problem with the NuGet package and it's references.

  • Robert Foster 446 posts 1751 karma points MVP admin c-trib
    Jul 23, 2014 @ 15:41
    Robert Foster
    0

    It's unlikely to be the nuget package, as it's installed without problem plenty of times for me and others... if it's not the package, then it's probably your view.  Are there any other views in your website giving you problems?

  • Ryan Langton 13 posts 33 karma points
    Jul 24, 2014 @ 02:36
    Ryan Langton
    0

    Here is the View.

     

    @using System.Web.Mvc.Html

    @inherits Umbraco.Web.Mvc.UmbracoTemplatePage

    @{

        Layout = "umbLayout.cshtml";

    }

    @{ Html.RenderPartial("umbHomepageBanner"); }

    <!-- Main -->

    <div id="main-wrapper">

        <div id="main" class="container">

    <div class="row">

                <div class="12u">

                    @{   Html.RenderPartial("umbNewsOverviewWidget"); }

                </div>

            </div>

            <div class="row">

                <div class="12u">

                    @{ Html.RenderPartial("umbFeatures"); }

                </div>

            </div>

        </div>

    </div>

    <!-- /Main -->

  • Ryan Langton 13 posts 33 karma points
    Jul 24, 2014 @ 02:41
    Ryan Langton
    0

    I thought it might be a conflict with System.Web.Mvc.Html.

    So I've removed that using directive.  I no longer get the error that UmbracoTemplatePage cannot be found.  Now I get an error any time I have @Html.RenderPartial (which is everywhere in my views).  But interestingly enough this was the only view that had the include for System.Web.Mvc.Html.

    Compiler Error Message: CS1061: 'System.Web.Mvc.HtmlHelper<Umbraco.Web.Models.RenderModel>' does not contain a definition for 'RenderPartial' and no extension method 'RenderPartial' accepting a first argument of type 'System.Web.Mvc.HtmlHelper<Umbraco.Web.Models.RenderModel>' could be found (are you missing a using directive or an assembly reference?)

  • Robert Foster 446 posts 1751 karma points MVP admin c-trib
    Jul 24, 2014 @ 02:53
    Robert Foster
    0

    Try @Html.Partial instead...

  • Ryan Langton 13 posts 33 karma points
    Jul 24, 2014 @ 02:56
    Ryan Langton
    0

    Same problem.


    Compiler Error Message: CS1061: 'System.Web.Mvc.HtmlHelper<Umbraco.Web.Models.RenderModel>' does not contain a definition for 'Partial' and no extension method 'Partial' accepting a first argument of type 'System.Web.Mvc.HtmlHelper<Umbraco.Web.Models.RenderModel>' could be found (are you missing a using directive or an assembly reference?)

  • Robert Foster 446 posts 1751 karma points MVP admin c-trib
    Jul 24, 2014 @ 03:42
    Robert Foster
    2

    something else I picked up on (sorry, should have read the other posts earlier):

    instead of

    @{ Html.RenderPartial("umbHomepageBanner"); }

    you could just do

    @Html.Partial("umbHomepageBanner")

    Can you post the contents of your web.config file in the /Views directory?

    and also the contents of umbHomepageBanner.cshtml...

     

  • Ryan Langton 13 posts 33 karma points
    Jul 24, 2014 @ 04:28
    Ryan Langton
    0

    You found the problem!

    The web.config in my /Views folder was completely empty.  Must have been cleared somehow during the upgrade.  I restored my old web.config (just the one in the /Views folder) and everything works now.

  • Robert Foster 446 posts 1751 karma points MVP admin c-trib
    Jul 24, 2014 @ 05:00
    Robert Foster
    0

    whew.  glad that's over ;)

  • Kevin Nolan 9 posts 60 karma points
    Dec 11, 2014 @ 02:56
    Kevin Nolan
    0

    Cheers Ryan! That solved my issue :)

  • Janet Kirklen 102 posts 212 karma points
    Jul 13, 2017 @ 15:40
    Janet Kirklen
    0

    I know this is an old thread, but I just had this same issue after a nuget upgrade from 7.5.13 to 7.6.4. The error I was getting was:

    'System.Web.Mvc.HtmlHelper

    Low and behold the /Views/web.config contained only the outer

    Thank you Ryan and Robert!

Please Sign in or register to post replies

Write your reply to:

Draft