错误:类型存在于两个目录中(Error: The type exists in both directories)

编程入门 行业动态 更新时间:2024-10-24 04:42:20
错误:类型存在于两个目录中(Error: The type exists in both directories)

在MVC2项目中,我将文件从App_code移动到Content文件夹并对其进行编译。 然后将其移回App_Code,然后将其Build Action更改为“Compile”。 现在我得到这个错误,我不知道如何解决这个问题,使我的程序再次工作:

CS0433:类型'Helper'存在于'c:\ Users ... \ AppData \ Local \ Temp \ Temporary ASP.NET Files \ root \ b00d4b7d \ b2553f9c \ App_Code.zowyklar.dll'和'c:\ Users“中。 .. \ AppData \ Local \ Temp \ Temporary ASP.NET Files \ root \ b00d4b7d \ b2553f9c \ assembly \ dl3 \ 5c6d3537 \ 19f85663_cde9cb01 \ MyProject.DLL'

清洁和重建不能解决问题。

In a MVC2 project I moved a file from App_code to Content folder and compiled it. Then move it back again to App_Code and then changed its Build Action to "Compile". Now I get this error and I don't know how to fix this to make my program work again:

CS0433: The type 'Helper' exists in both 'c:\Users...\AppData\Local\Temp\Temporary ASP.NET Files\root\b00d4b7d\b2553f9c\App_Code.zowyklar.dll' and 'c:\Users...\AppData\Local\Temp\Temporary ASP.NET Files\root\b00d4b7d\b2553f9c\assembly\dl3\5c6d3537\19f85663_cde9cb01\MyProject.DLL'

Cleaning and Rebuilding doesn't solve the problem.

最满意答案

尝试清理您的解决方案,然后尝试重建。 在创建新的dll之后,Visual Studio可能仍然引用旧的dll。

Try cleaning your solution and then try to rebuild. Visual Studio probably still has reference to the old dll after it created the new dll.

更多推荐

本文发布于:2023-07-25 10:43:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1260028.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:错误   两个   类型   目录中   exists

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!