错误:两个目录中都存在该类型 [英] Error: The type exists in both directories

查看:78
本文介绍了错误:两个目录中都存在该类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在MVC2项目中,我将文件从App_code移至Content文件夹并进行了编译.然后将其再次移回App_Code,然后将其生成操作"更改为编译".现在,我收到此错误,并且我不知道如何解决此错误,以使我的程序再次运行:

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:类型"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 文件\ root \ b00d4b7d \ b2553f9c \ assembly \ dl3 \ 5c6d3537 \ 19f85663_cde9cb01 \ MyProject.DLL'

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.

这篇关于错误:两个目录中都存在该类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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