The last post about namespaces was just the warm up. After I identified the situation and removed our references to the "SupportClass", I continued having issues with the build. The error was "such_and_such referenced class in 'this_and_that.dll' inherits from baseclass 'so_and_so' that is defined in another assembly that is not referenced. You must add a reference to ''this_and_that, version 1.0.0, culture: nuetral'
The baseclass is indeed defined in the same class as the derived class. (Confirmed thanks to Lutz Roeder's reflector)
Why couldn't it find a ref to itself?
As it turns out, nAnt will alphabetize your assembly references. Execute NAnt using the -verbose flag to see such details during execution. When looking for baseclasses, references, etc, csc.exe will inspect in the order of reference declarations. Therefore, my namespaceless collision of {global} "SupportClass" bit me again. What to do?
If NAnt is going to alphabetize, why not rename the offending class. Fortunately, only one class library, Novell.Directory.Ldap.dll makes is dependent and self-referencing on its "SupportClass". Therefore, I could rename the other dll to appear later in the alphabet.
<
copy file=".${bin.dir}\Awrecka.Navigation.dll" tofile="${build.dir}${bin.dir}\ZAwrecka.Navigation.dll" />
-- compile My.Enterprise.dll -->
<csc target="library" output="${bu ... />
-- copy the Awreckadll back to its proper name and get rid of zendeca -->
<copy file="${build.dir}${bin.dir}\ZAwrecka.Navigation.dll" tofile="${build.dir}${bin.dir}\Awrecka.Navigation.dll" />
<delete file="${build.dir}${bin.dir}\ZAwrecka.Navigation.dll" />
Anyone ever heard of a H A C K ?