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

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.

其他提示

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top