ASP.NET中类型来源不明确?是程序集A还是B?
- 内容介绍
- 文章标签
- 相关推荐
本文共计410个文字,预计阅读时间需要2分钟。
在Visual Studio 2013中开发Web应用程序时,遇到了一个类型模糊的问题:`The type 'AddressMaintenance.App_Code.DAL.DataSetTableAdapters.VALUESTableAdapter' is ambiguous: it could come from assembly 'C:\Windows\Microsoft.NET\...'`
解决方案:
1.确保所有项目引用正确:检查项目中是否正确引用了`AddressMaintenance.App_Code.DAL`项目,确保该项目是解决方案的一部分。
2.使用完全限定名称:在代码中明确指定类型所在的完整命名空间,例如:
csharp AddressMaintenance.App_Code.DAL.DataSetTableAdapters.VALUESTableAdapter valueAdapter=new AddressMaintenance.App_Code.DAL.DataSetTableAdapters.VALUESTableAdapter();3.检查项目配置:确保项目配置中没有错误,例如项目输出路径等。
希望这些信息能帮助你解决问题。
本文共计410个文字,预计阅读时间需要2分钟。
在Visual Studio 2013中开发Web应用程序时,遇到了一个类型模糊的问题:`The type 'AddressMaintenance.App_Code.DAL.DataSetTableAdapters.VALUESTableAdapter' is ambiguous: it could come from assembly 'C:\Windows\Microsoft.NET\...'`
解决方案:
1.确保所有项目引用正确:检查项目中是否正确引用了`AddressMaintenance.App_Code.DAL`项目,确保该项目是解决方案的一部分。
2.使用完全限定名称:在代码中明确指定类型所在的完整命名空间,例如:
csharp AddressMaintenance.App_Code.DAL.DataSetTableAdapters.VALUESTableAdapter valueAdapter=new AddressMaintenance.App_Code.DAL.DataSetTableAdapters.VALUESTableAdapter();3.检查项目配置:确保项目配置中没有错误,例如项目输出路径等。
希望这些信息能帮助你解决问题。

