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
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.
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.
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});
}
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:
Any help would be greatly appreciated.
Cheers,
Jason
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.
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.
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:
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
is working on a reply...