在预编译的ASP.NET 2.0网站上编译错误CS0433 [英] Compile Error CS0433 on pre-compiled ASP.NET 2.0 site

查看:443
本文介绍了在预编译的ASP.NET 2.0网站上编译错误CS0433的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我启动调试器调试我的网站时,我经常遇到这个错误。我使用的Telerik控件,通常的错误是在我的选项卡。下面是我正在查看的错误示例:

I keep getting this error ever so often when I launch the debugger to debug my site. I'm using the Telerik controls, and usually the error is in my tab strip. Here is an example of the error I'm looking at right now:

Compiler Error Message: CS0433: The type 'ASP.controls_motorvehiclegeneral_ascx' exists in both 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\statisticsweb\30c716d3\eebad209\App_Web_6wlqh1iy.dll' and 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\statisticsweb\30c716d3\eebad209\App_Web_ro_sgchs.dll'

Source Error:

Line 48:     </telerik:RadTabStrip>
Line 49:     <telerik:RadMultiPage ID="RadMultiPageControls" Runat="server" SelectedIndex="0">
Line 50:     <telerik:RadPageView ID="PageGeneral" runat="server"><uc1:General ID="GeneralControl" runat="server" /></telerik:RadPageView>
Line 51:     <telerik:RadPageView ID="PageVehicle" runat="server"><uc1:VehicleList ID="VehicleList" runat="server" /></telerik:RadPageView>
Line 52:     <telerik:RadPageView ID="PagePerson" runat="server"><uc1:PersonList ID="PersonList" runat="server" /></telerik:RadPageView>

最麻烦的事情是,如果我只是继续击中F5,页面将刷新和工作正如它应该。有时它需要几次刷新来做到这一点,其他它发生得很快。我还没有能够在网上找到一个解决方案,因为大多数有这个错误的人从VS2005升级到Web应用程序,因此该修复似乎是删除您的app_code目录,并将CodeFile =更改CodeBehind = 。但是,CodeBehind是旧的,不再使用。

The thing that bothers me most, is if I just keep hitting F5, the page WILL refresh and work as it should. Sometimes it takes several refreshes to do this, others it happens pretty quick. I have not been able to find a solution on the net, as most of the people with this error are upgrading from VS2005 to Web Application, and thus the fix seems to be "Remove your app_code directory, and change the CodeFile= to CodeBehind=. But, the CodeBehind is old, and not used anymore.

在这种情况下,我在我的常规选项卡上的错误,但它可能发生任何

In this instance, I'm getting the error on my General tab, but it can happen of ANY of my user controls when it DOES happen.

有没有其他人看过这个预编译的网页?我使用VS2008 SP1。

Has anyone else seen this with pre-compiled pages? I'm using VS2008 SP1.

我看到的另一个效果是,当我有一个GridView设置与数据源,并且数据源发生变化,但页面不更新,直到几个其他操作,然后一次所有的数据这使我认为有某种缓存问题,或编译时,超时或某事...

The other effect I've seen related to this is when I have a GridView setup with a datasource, and the datasource changes, but the page does not update until several other operations, then all at once all the data is filled in... This makes me think there is some sort of cache issue, or compile-time, time-out or something...

我使用site.master页面,并检查了@Page和@Master指令...只是为了参数,这里是它使用的编译器选项...

I am using a site.master page, and have checked the @Page and @Master directives... Just for the sake of argument, here are the compiler options it's using...


C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE> "c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\csc.exe" /t:library /utf8output /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\statisticsweb\30c716d3\eebad209\assembly\dl3\6614ff9a\005164fc_423cc801\PetersDatePackage.DLL" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.IdentityModel\3.0.0.0__b77a5c561934e089\System.IdentityModel.dll" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\Microsoft.ReportViewer.Common\9.0.0.0__b03f5f7f11d50a3a\Microsoft.ReportViewer.Common.dll" /R:"C:\WINDOWS\assembly\GAC_32\System.EnterpriseServices\2.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\statisticsweb\30c716d3\eebad209\App_Web_0-em44qa.dll" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\statisticsweb\30c716d3\eebad209\App_Web_6wlqh1iy.dll" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\statisticsweb\30c716d3\eebad209\App_Web_ro_sgchs.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\Microsoft.Build.Utilities\2.0.0.0__b03f5f7f11d50a3a\Microsoft.Build.Utilities.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.ServiceModel\3.0.0.0__b77a5c561934e089\System.ServiceModel.dll" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\statisticsweb\30c716d3\eebad209\assembly\dl3\6fe979bb\0056bc44_4b94c701\Microsoft.Practices.EnterpriseLibrary.Common.DLL" /R:"C:\WINDOWS\assembly\GAC_32\System.Web\2.0.0.0__b03f5f7f11d50a3a\System.Web.dll" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\statisticsweb\30c716d3\eebad209\assembly\dl3\ad70f8ed\0010f920_4b94c701\Microsoft.Practices.EnterpriseLibrary.Data.DLL" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.ServiceModel.Web\3.5.0.0__31bf3856ad364e35\System.ServiceModel.Web.dll" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\statisticsweb\30c716d3\eebad209\assembly\dl3\d61e8194\009ae0bd_854ec901\Telerik.Web.UI.DLL" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\statisticsweb\30c716d3\eebad209\assembly\dl3\98ba2ae7\211fb135_e674c901\CoreAPI.DLL" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Web.Extensions\1.0.61025.0__31bf3856ad364e35\System.Web.Extensions.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Management\2.0.0.0__b03f5f7f11d50a3a\System.Management.dll" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\statisticsweb\30c716d3\eebad209\assembly\dl3\62fa267e\9888875e_bb5cc901\AjaxControlToolkit.DLL" /R:"C:\WINDOWS\assembly\GAC_MSIL\Microsoft.Build.Framework\2.0.0.0__b03f5f7f11d50a3a\Microsoft.Build.Framework.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Drawing\2.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\statisticsweb\30c716d3\eebad209\App_Code.nufffrfb.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Web.Services\2.0.0.0__b03f5f7f11d50a3a\System.Web.Services.dll" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\statisticsweb\30c716d3\eebad209\assembly\dl3\52f6447d\f90fd1c8_b475c901\StatisticsAPI.DLL" /R:"C:\WINDOWS\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\statisticsweb\30c716d3\eebad209\assembly\dl3\955f38e7\982cdc0f_bc5cc901\Validators.DLL" /R:"C:\WINDOWS\assembly\GAC_MSIL\Microsoft.ReportViewer.WebForms\9.0.0.0__b03f5f7f11d50a3a\Microsoft.ReportViewer.WebForms.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Runtime.Serialization\3.0.0.0__b77a5c561934e089\System.Runtime.Serialization.dll" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\statisticsweb\30c716d3\eebad209\App_Web_nv7t8gs_.dll" /R:"C:\WINDOWS\assembly\GAC_32\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Design\2.0.0.0__b03f5f7f11d50a3a\System.Design.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.WorkflowServices\3.5.0.0__31bf3856ad364e35\System.WorkflowServices.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Web.Mobile\2.0.0.0__b03f5f7f11d50a3a\System.Web.Mobile.dll" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\statisticsweb\30c716d3\eebad209\assembly\dl3\a5daf5e0\0071b5e7_909cc701\Microsoft.Practices.ObjectBuilder.DLL" /R:"C:\WINDOWS\assembly\GAC_MSIL\Microsoft.ReportViewer.ProcessingObjectModel\9.0.0.0__b03f5f7f11d50a3a\Microsoft.ReportViewer.ProcessingObjectModel.dll" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\statisticsweb\30c716d3\eebad209\App_Web_atcckswk.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll" /out:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\statisticsweb\30c716d3\eebad209\App_Web_zva2jsmk.dll" /D:DEBUG /debug+ /optimize- /win32res:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\statisticsweb\30c716d3\eebad209\zva2jsmk.res" /nowarn:1659;1699;1701 /d:DBCONVERTPUBLIC;CRYSTALSUPPORT  "c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\statisticsweb\30c716d3\eebad209\App_Web_zva2jsmk.0.cs" "c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\statisticsweb\30c716d3\eebad209\App_Web_zva2jsmk.1.cs" "c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\statisticsweb\30c716d3\eebad209\App_Web_zva2jsmk.2.cs"

任何人都有任何想法,我甚至可以开始看看吗?

Anyone have any ideas where I can even start to look?

推荐答案

如上杀死Cassini实例对我没有效果。
ScottGu发布了此内容问题

killing Cassini instances as above didn't work for me. ScottGu posted about this issue

设置web.config中编译部分的batch =false属性为我工作。

setting the batch="false" attribute on the compilation section in web.config worked for me.

<configuration>

   <system.web>
       <compilation debug="false" batch="false"></compilation>
   </system.web>

</configuration>




这告诉ASP.NET动态
编译个别。 aspx / .ascx文件
到单独的程序集中。这避免
循环引用问题
触发异常。

This tells ASP.NET to dynamically compile individual .aspx/.ascx files into separate assemblies. This avoids the circular reference issue that triggers the exception.

这篇关于在预编译的ASP.NET 2.0网站上编译错误CS0433的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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