Copied to clipboard

Flag this post as spam?

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


  • Jason Espin 368 posts 1335 karma points
    Feb 05, 2016 @ 10:53
    Jason Espin
    0

    Does not contain a definition for 'RenderAction' - Error when pulling project from UaaS

    Hi all,

    I'm getting the following error when pulling down my UaaS project to my local machine for development. It compiles initially and pulls the database down but when i try and run it after that I get this error:

      Severity  Code    Description Project File    Line    Suppression State
        Error       'System.Web.Mvc.HtmlHelper<Umbraco.Web.Models.PartialViewMacroModel>' does not contain a definition for 'RenderAction' and no extension method 'RenderAction' accepting a first argument of type 'System.Web.Mvc.HtmlHelper<Umbraco.Web.Models.PartialViewMacroModel>' could be found (are you missing a using directive or an assembly reference?)     d:\Projects\Portfolio\App_Data\courier\revisions\__backup\Views\MacroPartials\InsertUmbracoForm.cshtml  10  
    

    Any help would be greatly appreciated.

    Cheers,

    Jason

  • Paul Sterling 718 posts 1534 karma points MVP 8x admin c-trib
    Feb 05, 2016 @ 13:34
    Paul Sterling
    1

    Jason -

    It looks like you are including the file(s) in

    \AppData\courier\revisions_backup\

    in your build - assuming you are using Visual Studio. In that case just make sure the folder is not included as part of the build/compile and you should be good to go.

  • Jason Espin 368 posts 1335 karma points
    Feb 08, 2016 @ 11:58
    Jason Espin
    0

    This allows the project to build and run but then when I try to restore the website I get an error saying access to the path is denied for the folder you mentioned above.

    Just to be clear, I am opening my project as a website in Visual Studio. I would just set it up as a normal solution but the documentation for doing this with UaaS and then only committing the compiled code is very limited.

  • Niels Hartvig 1951 posts 2391 karma points c-trib
    Feb 08, 2016 @ 12:36
    Niels Hartvig
    101

    Hi Jason!

    We're working on it, but for now it'll work if you edit "/views/macroPartials/InsertUmbracoForm.cshtml" and add a @using System.Web.Mvc.Html so the final contents of the file will be:

    @inherits Umbraco.Web.Macros.PartialViewMacroPage
    @using System.Web.Mvc.Html
    
    
    @if (Model.MacroParameters["FormGuid"] != null)
    {
        var s = Model.MacroParameters["FormGuid"].ToString();
        var g = new Guid(s);
    
        Html.RenderAction("Render", "UmbracoForms", new {formId = g});
    }
    
  • Jason Espin 368 posts 1335 karma points
    Feb 08, 2016 @ 12:55
    Jason Espin
    0

    Great. Thanks Niels. I did think about doing this the other day but I didn't want to mess with any of the upgrade stuff that was gone by UaaS.

    Cheers,

    Jason

Please Sign in or register to post replies

Write your reply to:

Draft