Reputation: 635
I have created a Web Forms application. In this application, I have a class named 'MYCLASS' located in the App_code folder. In the main project called PROJECTNAME, I have a webhandler named SignForm.ashx. In it, it references a function from my class MYCLASS. Yet for some reason, it marks it as red claiming:
"The type 'MYCLASS' exists in btoh 'PROJECTNAME, Version = 1.0.0.0, Culture=neutral, PublicKeyToken=null' and 'App_Code.7_pcboji, Version =0.0.0.0, Culture=neutral, PublicKeyToken=null'".
Why is it doing this? I have already tried the following solutions based on what I found on Stack Overflow:
Also of note: I didn't have this problem before when I created a generic web handler. The issue for me was that it was creating a .ashx file that was implemented by a ashx.cs file (I wanted everything in the .ashx file). When I referenced my class here, it did not give me the above error. However, as soon as I deleted the ashx.cs file and put everything in that .ashx file, that's when the problem started.
Again, what is going on with this and how can I resolve it?
Upvotes: 1
Views: 735
Reputation: 1417
Sometimes this problem appears when you rename the project so you will have two dlls in the bin folder (oldProject.dll and newProject.dll) and this will cause such a problem.
Upvotes: 1