BlogEngine Compile Error

224 Views Asked by At

I'm getting three similar errors when trying to compile a BlogEngine 2.6 Web Application Project:

In VS intellisense:

the type 'RazorHelpers' exists in both 'App_Code' and BlogEngine.Web.dll

Compile error:

Error    27  The type 'RazorHelpers' exists in both 
             'C:\inetpub\wwwroot\Nordic\Bin\BlogEngine.Web.dll' and 'App_Code'  
              c:\inetpub\wwwroot\Nordic\themes\RazorHost\CommentView.ascx   25  
2

There are 2 best solutions below

0
On BEST ANSWER

Eventually, I had to abandon the 2.6 WAP version and switch to the Website version, then migrate all of my design and code customizations.

1
On

In WAP projects you want to make sure you don't use the app_code directory because classes within that directory will get compiled twice (once in the code-behind and again at runtime) unless you exclude the file from the WAP project.

You could also try renaming the app_code directory to something else.