ASP.NET中类型来源不明确?是程序集A还是B?

2026-04-30 12:0610阅读0评论SEO资源
  • 内容介绍
  • 文章标签
  • 相关推荐

本文共计410个文字,预计阅读时间需要2分钟。

ASP.NET中类型来源不明确?是程序集A还是B?

在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.检查项目配置:确保项目配置中没有错误,例如项目输出路径等。

希望这些信息能帮助你解决问题。

我正在Visual Studio 2013上开发Web应用程序,我遇到了下一个问题:

The type ‘AddressMaintenance.App_Code.DAL.DataSetTableAdapters.VALUESTableAdapter’ is ambiguous: it could come from assembly ‘C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\47bb176a\b43c95ba\App_Code.xtamkrzu.DLL’ or from assembly ‘C:\inetpub\wwwroot\AddressMaintenance\bin\AddressMaintenance.DLL’. Please specify the assembly explicitly in the type name.

我已经阅读了互联网和其他用户的问题,我没有找到错误.
我也尝试在IIS7上运行应用程序(不是在我正在开发Web的计算机上),我得到了同样的错误.

使应用程序崩溃的代码是:

<asp:ObjectDataSource ID="ODS_GetUsers" runat="server" SelectMethod="getUsers" TypeName="AddressMaintenance.App_Code.DAL.DataSetTableAdapters.USERSTableAdapter"> <SelectParameters> <asp:Parameter DefaultValue="Active" Name="value_type" Type="String" /> </SelectParameters> </asp:ObjectDataSource>

先感谢您.

我在这里找到了解决方案 vishaljoshi.blogspot.co.uk/2009/07/appcode-folder-doesnt-work-with-web.html

我将App_Code文件夹重命名为其他文件夹.

谢谢.

ASP.NET中类型来源不明确?是程序集A还是B?

本文共计410个文字,预计阅读时间需要2分钟。

ASP.NET中类型来源不明确?是程序集A还是B?

在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.检查项目配置:确保项目配置中没有错误,例如项目输出路径等。

希望这些信息能帮助你解决问题。

我正在Visual Studio 2013上开发Web应用程序,我遇到了下一个问题:

The type ‘AddressMaintenance.App_Code.DAL.DataSetTableAdapters.VALUESTableAdapter’ is ambiguous: it could come from assembly ‘C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\47bb176a\b43c95ba\App_Code.xtamkrzu.DLL’ or from assembly ‘C:\inetpub\wwwroot\AddressMaintenance\bin\AddressMaintenance.DLL’. Please specify the assembly explicitly in the type name.

我已经阅读了互联网和其他用户的问题,我没有找到错误.
我也尝试在IIS7上运行应用程序(不是在我正在开发Web的计算机上),我得到了同样的错误.

使应用程序崩溃的代码是:

<asp:ObjectDataSource ID="ODS_GetUsers" runat="server" SelectMethod="getUsers" TypeName="AddressMaintenance.App_Code.DAL.DataSetTableAdapters.USERSTableAdapter"> <SelectParameters> <asp:Parameter DefaultValue="Active" Name="value_type" Type="String" /> </SelectParameters> </asp:ObjectDataSource>

先感谢您.

我在这里找到了解决方案 vishaljoshi.blogspot.co.uk/2009/07/appcode-folder-doesnt-work-with-web.html

我将App_Code文件夹重命名为其他文件夹.

谢谢.

ASP.NET中类型来源不明确?是程序集A还是B?