dukesb11 wrote
One thought, can you make sure that you don't have any other .dlls in the /bin with the same class that it could be getting confused on?
Secondly, if you debug into the call to CreateType, can you look at the type that is returned (from the cache?) and see what type it is and which assembly it is from, see if anything looks fishy there?
Okay folks... Are you ready for a new symptom that I overlooked? When I originally created this class, I named it "MyCompany.Providers.MyCompanySqlDataProvider" (substituting MyCompany of course). However, I soon realized that my namespace was already "MyCompany.Provider" (not plural). So, I changed it for the obvious reasons.
(I stated the previous to say this...)
I was reminded of the old namespace when I double-checked the bin for any extra builds that shouldn't be there. I didn't find a previous or conflicting build, but I did find the XML comment file in there with the OLD namespace. So, I deleted it. When I rebuilt the DLL, the XML file was recreated with the WRONG namespace. What would cause that?
The XML comment file does NOT match the namespace in the class file, so the compiler is doing something weird...
I also just checked the DLL in Reflector and the correct namespace is indeed generated for the DLL. Has anyone heard of such a thing???