该类型是否存在于app_code和网站中? [英] The type exists in both app_code and a website?
问题描述
我在Visual Studio 2015中打开了一个在Visual Studio 2005中开发的网站。
我已经构建了它低于错误 -
类型'Log'存在于1_App_code,version = 0.0.0.0,Culture = neutral,PublicKeyToken = null'和'WebMail,version5.0.0.0,Culture = neutral ,PublicKeyToken = null'
我使用Log.cs文件进行记录,文件在App_Code文件夹下可用。
请建议。
谢谢。
我尝试过:
我尝试在谷歌搜索此类错误。但是,没有什么能解决问题。
Hi,
I have a website open in Visual Studio 2015 which were developed in Visual Studio 2005.
I have build it and getting below error-
The type ‘Log’ exists in both 1_App_code, version=0.0.0.0, Culture=neutral, PublicKeyToken=null’ and ‘WebMail, version5.0.0.0, Culture=neutral, PublicKeyToken=null’
I am using Log.cs file for logging purpose and file available under App_Code folder.
Please suggest.
Thanks.
What I have tried:
I tried search on google for this kind of error. However, nothing will resolve the issue.
推荐答案
尝试清理解决方案,然后尝试重建。在使用VS2015创建新dll之后,Visual Studio可能仍然引用了旧的dll
此处解释类似于此问题:
c# - 错误CS0433& quot;类型' X'已存在于A.dll和B.dll& quot;来自? - 堆栈溢出 [ ^ ]
希望这会有所帮助!
Try to clean your solution and then try to rebuild. Visual Studio probably still has reference to the old dll after it created the new dll with VS2015
A problem similar to this one is explained here:
c# - Where does error CS0433 "Type 'X' already exists in both A.dll and B.dll " come from? - Stack Overflow[^]
Hope this helps !
这篇关于该类型是否存在于app_code和网站中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!