Solving error S0433 “Type ‘X’ already exists in both A.dll and B.dll

This issue appears to present after a change is made to the application’s project that results in a new build (e.g., code/reference/resource change). The issue appears to lie within the output of this new build: for various reasons Visual Studio is not replacing the entire contents of your application’s obj/bin folders. This results in at least some of the contents of your application’s bin folder being out of date.

Solution

– Close Visual Studio
– Perform an iisreset
– Delete all the folders and files within the “Temporary ASP.NET Files” folder (the path is referenced in the error message)
– Delete the offending application’s “obj” and “bin” folders
– Restart Visual Studio and open the solution
– Perform a “Clean Solution” followed by a “Rebuild Solution”