Search code examples
asp.net.netobjectdatasource

The type "..." is ambiguous: it could come from assembly "..." or from assembly "...". Please


I'm developing a Web Application on Visual Studio 2013 and I have the next problem:

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.

I've read on internet and other user questions and I didn't find the error. I have also tried to run the Application on IIS7 (not in the computer where I'm developing the Web) and I get the same error.

The code that makes the application to crash is:

<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>

Thank you in advance.


Solution

  • I found the solution here http://vishaljoshi.blogspot.co.uk/2009/07/appcode-folder-doesnt-work-with-web.html

    I renamed the App_Code folder to other one.

    Thanks.