Compilation error 'CS0433: The type '' exists in both

Discussion in 'ASP.NET 2.0' started by jackharper, Nov 11, 2008.

  1. Hi.

    I'm having the following error which you can see at;

    http://kiranc.co.uk/portfolio/CondolencesProject/

    I know that one way to resolve this is to delete one of the dll files specified by the error message. However, I don't know if I have the necessary access to do this, or whether this needs to be done for me. Is there any other way in which I can resolve this? I've looked through my website, and have not seen any duplicate occurrence of the user control titled 'textEntry.'

    Thanks,

    K
     
  2. Hi.

    I've found a solution to this problem at the following website;

    http://forums.asp.net/p/998851/1312617.aspx

    One of the solutions (inserting a <compilation batch='false'> in the web.config file worked for me, and solved the problem). However, can anyone advise how this will affect performance? Is this a best practise workaround?

    Thanks,

    K
     
  3. I just read that <compilation debug='false'> is not a good option for performance, and so I took it out of my web.config, and my page started working again! That was weird, but somehow the problem seemed to sort itself out!

    This will perhaps be useful to anyone who might encounter such an error in the future.
     
  4. Compiler Error Message: CS0433: The type <type> exists in both <x.dll> and <y.dll>

    The solution above, adding batch="false" and debug="false" attributes to the <Compilation> element in web.config, does not work for me.

    Ordinarily, I'd just delete the temporary files but I don't have access to these.

    The alternative perhaps is to edit all the files with instances of code that trigger this compilation error so that this forces recompilation but that's more than a little ugly (and time-consuming).

    Maybe if I changed the path, the directory in which I've created the web application - the directory into which I've deployed - then this too would fix it, however, I'd quite like to keep the blog in the /blog directory :)

    So, how might I be able to fix this nicely?

    Kofi Sarfo
     
  5. Hi,
    In your site the root web.config has priority, each folder can have its own web.config but there is inheritance from the site tree.
    If you have more than one web.config make sure each has the compilation setting will do it and you can also set this in each page, or Master page.
    Salute,
    Mark
     

Share This Page