My Funny Surprises With .NET 2.0
As I was developing applications for .Net Framework 1.0 and 1.1, I was building a couple of code libraries with features I found smart and useful for my apps.
Being an active member of dotNetZone.gr, (a Greek .net developer community often nicknamed DNZ), I recently decided to share some of that code with others in DNZ.
The idea was to do that while porting the code to .Net Framework 2.0 through Visual Studio 2005.
Now, what’s so funny about that?
First thing I wanted to share was my Wizard classes. I implemented them in the context of a web project and used to find them brilliant.
Using SourceSafe Ι started today pinning and branching code to a new VS 2005 solution that would contain the part of my libraries related to Wizards.
“Come on! Where is the funny part?” you would still ask!
Well I compiled it and got the following compile time errors:
- Error1: 'Wizard' is an ambiguous reference between 'System.Web.UI.WebControls.Wizard' and 'Softbone.Shared.Wizards.Wizard'
- Error 2: 'WizardStep' is an ambiguous reference between 'System.Web.UI.WebControls.WizardStep' and 'Softbone.Shared.Wizards.WizardStep'
- Error 3 'WizardStepCollection' is an ambiguous reference between 'System.Web.UI.WebControls.WizardStepCollection' and 'Softbone.Shared.Wizards.WizardStepCollection'
(note: Softbone is brand name I am using, and Softbone.Shared is the namespace of the shared code library I am creating porting my code from .net framework 1.1 to 2.0).
Ooops!
Not only Microsoft implemented the same functionality as I did, but the just happened to have chosen the same class names as I did!
Well that, I thought was funny enough to mention…
So, it might be the case that my library is obsolete with the new version of the .Net Framework, but still, here is what is more interesting about it now than ever: I have to check my implementation against Microsoft’s one to see where mine falls short or even if I did some things that are better or smarter than Microsoft’s.
So I will be posting my code soon to my main blog and my .net blog in DNZ and keep you posted here, to see if I have more interesting or funny encounters during my Wizard Library porting to .Net Framework 2.0.
I ‘ll let you know….