vb.net编译错误'abc'在命名空间'xyz'中是不明确的, [英] vb.net compile error 'abc' is ambiguous in the namespace 'xyz'

查看:915
本文介绍了vb.net编译错误'abc'在命名空间'xyz'中是不明确的,的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个VB.Net解决方案,另一个开发人员创建,我试图在我们的构建机器上编译(它在自己的机器上编译),但是有一个项目,我得到一个错误,



Imyinterface 在命名空间中不明确 anamespaceassembly



我尝试没有成功:





  • 搜索系统中的相同dll

  • 尝试编译原始deve的src(.v源控件版本)

  • 检查了ildasm.exe的汇编



    • 我通常在C#代码,并没有看到这个错误之前(至少在这种形式),而不是它是特定的VB.Net,但添加/查看引用的UI是略有不同,所以我想可能VB.Net可能做不同的引用。



      我也试图在另一台机器上编译,它编译确定。所以我认为它是与构建机的东西,但我不知道什么。



      任何想法?

      解决方案

      如果您有两个版本的相同引用(例如Microsoft.ReportViewer.Webforms版本10.0.0.0和Microsoft.ReportViewer.Webforms 8.0.0.0),请检查您的引用你会得到此错误。删除最老的,你应该是好的。我这么做对自己所有的时间。


      I have a VB.Net solution that another developer created and I'm trying to compile it on our build machine (it compiles on their machine) but with one of the projects I get an error saying something along the lines of:

      Imyinterface is ambiguous in the namespace anamespaceassembly.

      I have tried with no success:

      • examined the references to see any obvious errors
      • removed and re-added the assembly in question
      • searched the system for the same dll
      • attempted to compile the original deve's src (.v the source control version)
      • examined the assembly with ildasm.exe

      I usually code in C# and have not seen this error before (in this form at least), not that it is VB.Net specific but the UI for adding/viewing references is slightly different so I thought maybe VB.Net might do something different with references.

      I also tried to compile on another machine, and it compiles ok. So I assume it is something with the build machine but I'm not sure what. Other conflicting assemblies somehow not referenced by the project, is that possible??

      Any ideas?

      解决方案

      Check your references if you have two versions of the same reference (eg. Microsoft.ReportViewer.Webforms version 10.0.0.0 and Microsoft.ReportViewer.Webforms 8.0.0.0) You will get this error. Delete the oldest and you should be good. I do this to myself all of the time.

      这篇关于vb.net编译错误'abc'在命名空间'xyz'中是不明确的,的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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