A: 

ABC.DLL is referenced by your website and it becomes part of it (it is in Bin folder). ASP.NET compiles your website and ABC.DLL is placed in temp location (C:\Windows...\Temporary ASP.NET Filse...). It gets loaded by ASP.NET automatically. You are trying to load ABC.DLL manually from different location (D:\junk\abcabstract\bin\abc.dl). Two assemblies do not match hence you get the error.

To stop this from happening you have to rethink your plugin architecture I guess. Can you give more information?

Update: Why don't you fix it like this:

// Assembly _abc_assembly = Assembly.LoadFile(“c:\junk\abcabstract\bin\abc.dll”);
// ContentAttribute attribute;
// attribute = (ContentAttribute)_abc_assembly.CreateInstance("ABC.TextAttribute");
ContentAttribute attribute = new ContentAttribute();
Pavel Chuchuva
I could swear this wasn't happening a day ago. There is no real architecture here yet, it's a test project, I just need it to work!
Petras
Why you need to load assembly using full path? I added code that creates ContentAttribute instance without reflection.
Pavel Chuchuva
I need to examine classes using reflection and cast certain types back to a base type as I perform certain operations. The code above is not realistic but clearly points out the problem.
Petras
A: 

It's a namespace collision. It doesnt know which ContentAttribute to use since it is finding 2 in different namespaces/assemblies.

You may have an old copy of the DLL named differently. Delete your temporary ASP.Net directories and recompile.

To avoid in the future:

Use fully qualified names for your objects if you need to get it to work.

ABC.ContentAttribute ca = new ABC.ContentAttribute();

or if casting do the same

ABC.ContentAttribute ca =(ABC.ContentAttribute)ca2;
Chad Grant
I have added fully qualified names and deleted all temporary files but it still doesn't work. See my updated question.
Petras
this could be a dumb question, but in your code at the top you are calling load from "C:\" while the project is in the "D:\" drive. and since you are casting TextAttribute, i assume it inherits from ContentAttribute or that wouldnt work. And the error message leads me to believe you should be looking in the Default.aspx.cs which I do not see in your project. Maybe its hidden, click the "show hidden files" at the top of the solution explorer.
Chad Grant