ASP.Net编译冲突...我的usercontrol存在于两个位置 [英] ASP.Net Compilation Conflict... My usercontrol exists in two locations
问题描述
我收到以下错误消息,试图运行我的页面
I get the following error message trying to run my page
Compiler Error Message: CS0433: The type 'usercontrols_BirthDetails' exists in both 'c:\windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\5c377e82\1f883022\App_Web_ub0hcxgl.dll' and 'c:\windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\5c377e82\1f883022\App_Web_3ndqr5wn.dll'
代码在我的机器上正常运行,并且如上所述在服务器上失败。
The code works okay on my machine, and fails on the server as above.
有时会发生在我的机器上机器,但我可以通过关闭视觉工作室并重新启动它来解决它。所以我猜这是由于ASP.Net正在进行的一些编译错误而发生的一些冲突。
Sometimes this happens on my machine, but I can fix it by closing visual studio and re-starting it. So I guess it's some conflict that happens due to some compilation mistake that ASP.Net is making.
我的问题是,如何在我的服务器上修复此问题而不重新启动它。
My question is, how can I fix this on my server without rebooting it.
推荐答案
好吧,我确实解决了这个问题,但根本原因是其他的......显然它有事情要做声明我的usercontrol类型的变量。出于某种原因,这不同意服务器上的ASP.Net(虽然它在我自己的机器上被很好地消化了)......我不知道为什么会发生这种情况但是这条线索是向Jon发出的信号Skeet介入并描述技术mumbo-jumbo中的内容。
Well, I did solve the problem, but the root cause was something else... Apparently it had something to do with declaring a variable of my usercontrol's type. For some reason this wasn't agreeing with ASP.Net on the server (though it was well-digested on my own machine)... I don't have any idea why exactly this was happening but this clue is a signal to Jon Skeet to step in and describe the thing in technical mumbo-jumbo.
我的解决方案是删除usercontrol变量声明。我接受了解决方法。
The solution in my case was to remove the usercontrol variable declaration. I got by with a workaround.
这篇关于ASP.Net编译冲突...我的usercontrol存在于两个位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!