DLL 中的 App_Code 重复变量
我已将一个类移至 App_Code 文件夹,现在收到以下错误消息:
CS0433: The type 'myProject.App_Code.ItemType' exists in both 'c:\WINDOWS\
Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\8cdcbe9c\
b9695514\assembly\dl3\e5cfe230\82ca7cf7_5c89ca01\myProject.DLL' and
'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\
root\8cdcbe9c\b9695514\App_Code.5kpxjdxm.dll'
此错误在运行时返回。
我已经在我的应用程序中搜索了任何重复项,但我猜测这是由于某些内容未按我的预期更新所致?
如果我将类移回 App_Code 文件夹之外,一切都会按预期再次运行。
我缺少什么?
I've moved a class to the App_Code folder and I'm now receiving the following error message:
CS0433: The type 'myProject.App_Code.ItemType' exists in both 'c:\WINDOWS\
Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\8cdcbe9c\
b9695514\assembly\dl3\e5cfe230\82ca7cf7_5c89ca01\myProject.DLL' and
'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\
root\8cdcbe9c\b9695514\App_Code.5kpxjdxm.dll'
This error is returned at runtime.
I've searched my application for any duplicate but I'm guessing this is due to something not updating as I expect?
If I move the class back outside of the App_Code folder, everything works again as expected.
What am I missing?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您是否尝试过:
Temporary ASP.NET Files
文件夹并重新启动 Visual Studio ?Have you tried:
Temporary ASP.NET Files
folder and restarting Visual Studio ?您是否将文件复制到 app_code 中而不是移动它?或者您是否创建了文件/页面/控件的备份副本?
这些也可能是错误消息的原因。
Did you copy the file into app_code instead of moving it? Or have you created a backup copy of the file/page/control?
These could also be reasons for the error message.