ASP.Net错误:"类型'富'在这两个&QUOT存在; temp1.dll"和" temp2.​​dll" [英] ASP.Net error: "The type 'foo' exists in both "temp1.dll" and "temp2.dll"

查看:112
本文介绍了ASP.Net错误:"类型'富'在这两个&QUOT存在; temp1.dll"和" temp2.​​dll"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当运行Web应用程序项目,在看似随意次页面可能会失败,一个CS0433错误:在多个DLL的存在类型。 DLL的都生成的DLL的居住在临时ASP.NET文件目录。

When running a web application project, at seemingly random times a page may fail with a CS0433 error: type exists in multiple DLL's. The DLL's are all generated DLL's residing in the "Temporary ASP.NET Files" directory.

推荐答案

批=false属性添加到web.config文件中的编辑元素。

Add the batch="false" attribute to the "compilation" element of the web.config file.

发生此问题,因为在ASP.NET 2.0使用应用程序引用和应用程序的文件夹结构来编译应用程序的方式。如果应用程序的web.config文件中的元素的批属性设置为true,ASP.NET 2.0应用程序中的每个文件夹编译成一个单独的程序。

This problem occurs because of the way in which ASP.NET 2.0 uses the application references and the folder structure of the application to compile the application. If the batch property of the element in the web.config file for the application is set to true, ASP.NET 2.0 compiles each folder in the application into a separate assembly.

<一个href=\"http://www.sellsbrothers.com/news/showTopic.aspx?ixTopic=1995\">http://www.sellsbrothers.com/news/showTopic.aspx?ixTopic=1995

http://support.microsoft.com/kb/919284

这篇关于ASP.Net错误:&QUOT;类型'富'在这两个&QUOT存在; temp1.dll&QUOT;和&QUOT; temp2.​​dll&QUOT;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆