My Software Notes

Useful things I discover

Compiler Error Message: CS0433 in ASP.NET

with 5 comments

I got this error today and it made no sense at all:

The type 'some_class_name' exists in both 'some_temp.dll' and 'some_other_temp.dll'

The only change I’d made was to some css.

Here’s how I got the error: I had made some changes to a particular user control before I figured out that the layout problem was in the css. I didn’t want to lose my changes, just in case I needed them, so I made copies of the ascx file and its designer file. Then I reverted all changes, modified the css and ran the web site – clang! The error happened.

After googling it, shutting down the VS web server, clearing out the temp ASP.NET folder, cleaning the solution in Visual Studio, rebuilding, rebooting, etc., etc., and nothing working, I finally figured it out.

It was the copies of the files. Despite the fact that the copies were NOT part of the project, the VS web server was compiling them. So of course there were classes with duplicate names.

Once the copies were removed the web site ran fine.

Very annoying.


Written by gsdwriter

November 12, 2010 at 1:22 pm

Posted in ASP.NET

5 Responses

Subscribe to comments with RSS.

  1. can u pls show how did u delete the file….


    July 6, 2011 at 6:40 am

    • Hey deva,

      I just closed the Visual Studio web server and deleted the files from the file system. They weren’t part of the project so I didn’t need to do anything in VS.

      The problem was caused by me copying the ascx file and leaving it in a folder that the web server would read and compile. So the fix was for me to delete the ascx file.

      I hope that answers your question.


      July 6, 2011 at 9:02 am

  2. i have th same problem is there any documentation pls share


    July 6, 2011 at 6:41 am

    • I didn’t find any documentation because I was able to solve it and I felt I understood what had caused it, so I didn’t look any further. My guess is you could find docs on this if you dug into the bowels of the Visual Studio web server.

      This issue may occur in IIS or IIS Express (I haven’t tried it but I’d expect the same issue), so there may be something in the docs for them also.


      July 6, 2011 at 9:06 am

  3. thank you very much! you made my day!.. šŸ˜‰


    September 22, 2011 at 9:25 am

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: