'Helpers' does not exist in the current context (In Web Application Project)

Topics: ASP.NET 2.0, Themes
Aug 11, 2011 at 5:41 PM
Edited Aug 11, 2011 at 5:41 PM

Hello,

I'm currently running BE 2.5 and recently converted the project to a Web Application. I haven't had any problems with the project up until I tried browsing to the Themes.cshtml page (Extensions/default.cshtml produces a similar result in reference to 'Helpers'). I have all the Razor DLLs in the bin folder and I tried the solutions put out in this discussion thread, http://blogengine.codeplex.com/discussions/262106, but to no avail. I never had this problem prior to converting to a Web Application so I suspect that may be the issue.


Compilation Error

Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: CS0103: The name 'Helpers' does not exist in the current context

Source Error:


Line 55:         <div>
Line 56:             @if (tab == "1"){
Line 57:                 @Helpers.AdminHelper.InstalledThemes()
Line 58:             }
Line 59:             else{


Source File: c:\xxx\admin\Settings\Themes.cshtml    Line: 57

Aug 13, 2011 at 1:57 AM
Edited Oct 24, 2011 at 7:38 PM

Move the helpers where ever it is keept

in to the bin  and not compile with the rest.

 

Since you said its a "Web Application"  issue

 

its might because the Helpers are bundle up with other things and its missing something up.

 

Figure out which files control the helpers and create new dll for them and put it in to the bin folder.

 

Hopefully that works.

 

I really don't mess with web apps :)

 

I like it uncompliled because I change the code alot :)

Java Blog

Oct 10, 2011 at 5:09 AM

I ran into the same problem and essentially just had to move the 3 helper extensions (AdminHelper.cshtml, DashboardHelper.cshtml, and ExtensionsHelper.cshtml) into the App_Code\Helpers folder in the solution.  

Here is a link to where someone documented the complete steps:  http://blogengine.codeplex.com/discussions/270218