2015-06-13 135 views
0

我是ASP.Net的初学者WebForms.I在运行我的应用程序时遇到问题。ASP.NET WebForms

这是我的编译错误:

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: CS0433: The type 'ASP.global_asax' exists in both 'c:\Users\DELL\AppData\Local\Temp\Temporary ASP.NET Files\root\7b316ac0\74a3eae4\App_global.asax.nlr3yglh.dll' and 'c:\Users\DELL\AppData\Local\Temp\Temporary ASP.NET Files\root\7b316ac0\74a3eae4\assembly\dl3\c7339aea\6d83affb_aa85d001\App_global.asax.DLL'

源错误:

Line 165:  } 
Line 166:   
Line 167:  protected ASP.global_asax ApplicationInstance { 
Line 168:   get { 
Line 169:    return ((ASP.global_asax)(this.Context.ApplicationInstance)); 

源文件:C:\用户\ DELL \应用程序数据\本地的\ Temp \临时ASP.NET文件\根\ 7b316ac0 \ 74a3eae4 \ App_Web_userlogin.ascx.cdcab7d2.wpz3jgra.0.cs行:167

+0

你的源代码在哪里? – warunapww

+0

可能的重复[编译错误:类型'ASP.global \ _asax'存在于这两个DLL中](http://stackoverflow.com/questions/20852039/compilation-error-the-type-asp-global-asax-exists -in-both-dlls) –

+0

检查您是否没有名为global.asax的2个文件。如果您不这样做,请尝试上述链接中的步骤。 –

回答

0

我认为你不应该使用每个页面构建程序集的选项。你应该建立一个单一的程序集。如果每页使用程序集,则在部署时应删除该bin中的所有程序集,因为它们是以前的版本,并且名称中具有唯一的ID,因此它们不会被覆盖。

你的情况,清理你的垃圾箱,然后建立。但我会建议一个完整的代码隐藏更新的单个库,而不是针对特定页面的特定代码隐藏更新。

+0

我有一个巨大的项目,每个页面都有很多程序集 – user2301941