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:
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).
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.
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?
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?)
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?)
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.
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.
Tried changing it to just Html.Partial?
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
You might of tried these but:
Hope one of these help. Sound like your on the right track already (i.e. deleting TEMP)
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 :(
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.
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.
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.
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?
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 -->
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?)
Try @Html.Partial instead...
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?)
something else I picked up on (sorry, should have read the other posts earlier):
instead of
you could just do
Can you post the contents of your web.config file in the /Views directory?
and also the contents of umbHomepageBanner.cshtml...
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.
whew. glad that's over ;)
Cheers Ryan! That solved my issue :)
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!
is working on a reply...