The message sent to browser is as follows:
The type My.API.Class is ambiguous: it could come from assembly ‘[on Temporary ASP.NET Files]’ or from assembly ‘[on bin folder]’
The problem occurs when debugging a Web App, specifically when making a request to a WebMethod of a WebService.
The project compiles just right. It generates My.Website.dll on bin folder and if I publish the Web Application. It works fine.
The asmx file is on the root of the application. The CodeBehind file is on App_Code and its marked to be compiled to generate My.Website.dll.
I should be missing something really important.
I found someone having the same issue with a possible related cause. Check it out. The way this person exposes its problem is somehow similar but I get starting to be lost when he talks about a proxy class and shared dlls I don’t use.
Any help is appreciated.
According to this, the App_Code folder should be used only on Web Site projects. That’s the reason the CodeBehind of the asmx was compiled at runtime too.
The initial question was made based on a Web App. But I didn’t specify this Web App. was been manually changed from a Web Site project.
To solve my problem I did the following:
@Tony: Thank you for guiding me.