Stupid Code To The Rescue!
secretGeek .:dotnuts about dotnet:.
home .: about .: sign up .: sitemap .: secretGeek RSS

Stupid Code To The Rescue!

A big dose of .NetFrustration this morning.

When you upgrade an assembly from version 1.0 to version 1.1 you are likely to get a lot of squiggley blue lines and warnings such as:

OR:

OR worse yet:

Google turned up blank, MSDN turned up blank, but I finally got rid of the warnings, by writing stupid code.

(Read on for some dodgy solutions and some stern lectures. :+))




(Comments disabled due to spam)



'Dan F' on Sun, 15 Jan 2006 19:22:43 GMT, writes:

Almost 2 years on, and this post is still going strong. You're the number one google hit for "you should pass xmlresolver" (with quotes). How spesh do you feel :)

Thanks Leon!

URL: http://www.redgum.com.au



'harveysburger' on Sat, 12 Nov 2005 20:08:34 GMT, writes:

thanks for this easy fix :)

thats hilarious...
, nothing, nothing....



'ricpue@hotmail.com' on Sat, 12 Feb 2005 19:57:06 GMT, writes:

Funny and good.



'secretGeek' on Wed, 06 Oct 2004 20:43:09 GMT, writes:

cheers Farhan!

and Thrain: i'm glad to know that this post is helping the peoples of middle earth.

URL: http://secretGeek.net



'Thraïn' on Wed, 06 Oct 2004 10:31:05 GMT, writes:

Leon,

My search for a solution for the same problems ended after 3 hours with your post. Thank you so much!


Greetings



'Farhan Ahmad' on Sun, 26 Sep 2004 23:51:13 GMT, writes:

Hey Leon,

Thanks for this post! It saved me quite some time and frustration!


Thanks!

URL: http://www.farhan-ahmad.net



'secretGeek' on Mon, 26 Apr 2004 05:58:06 GMT, writes:

Thanks Kathleen! I agree that they should make old methods obsolete -- but I think that the documentation they provide for these upgrades is quite poorly thought out.

The comment 'You should pass XmlResolver to Transform()' (for example) is a redundant comment, since the intellisense will show you that an XmlResolver parameter is now required. What I think the upgrade comments should do is point you toward documentation that explains:

Why the change was made.
How to cater for the change (giving practical examples).
What benefits you will get from making this upgrade.

Generally the comments they choose to include just have a statement like 'Hey, don't use this, use that instead' -- in this era of secure computing we're expected to know what we're coding and why -- not just to blindly follow. SO i think this is one little area where microsoft could pay more attention to the needs of developers.

For example, looking up what an XmlResolver is didn't do anything to tell me why it was previously unimportant but now is important. Clearly there's a design design they've made under the covers -- but there's no clue as to what it is. Okay, my XmlDocument didn't have any external references that needed to be resolved -- so a resolver of nothing seemed fine. But it felt wrong -- they've chosen to include it for a reason I guess, so i felt like there was something I was missing.

Having said that, i do think that MS generally do an excellent job of looking after developers -- this just seems to be a chink in the armour. A place where the developers are taking shortcuts and noone is stopping them.

cheers
lb

URL: http://secretGeek.net



'Kathleen Dollard' on Sat, 24 Apr 2004 23:02:22 GMT, writes:

I know this looks stupid, but I think there's some logical reason behind this. The new parameters are important, quite important in a few scenarios. If they had not made the old ones obsolete, there would have been a gazillion and you were forced to look at this issue. I actaully investigated what the resolvers were before making the same changes a year ago.

While the CType(Nothing, whatever) approach feels like a hack, it appears to be the appropriate way to resolve overloads anytime Nothing is confusing the issue.



Back to Stupid Code To The Rescue!

Articles

Mind-boggling Demo of New Gaming Genre, aka Folder-Based Hangman, aka Fun with Recursion Mind-boggling Demo of New Gaming Genre, aka Folder-Based Hangman, aka Fun with Recursion
Got CSV in your javascript? Use agnes. Got CSV in your javascript? Use agnes.
I went to write down a book name and founded an internet empire instead. I went to write down a book name and founded an internet empire instead.
NimbleText: Origins NimbleText: Origins
The Windows 8 Mullet The Windows 8 Mullet
Cosby: spontaneous striped background generator Cosby: spontaneous striped background generator
Slides from WDCNZ: Live Coding Asp.net MVC3 Slides from WDCNZ: Live Coding Asp.net MVC3
MVC 3, MVC 3, "Third Times a Charm" references
Custom Errors in ASP.Net MVC: It couldn't be simpler, right? Custom Errors in ASP.Net MVC: It couldn't be simpler, right?
Anatomy of a Domain Hijacking, part 2: The Website Who Came In From The Cold Anatomy of a Domain Hijacking, part 2: The Website Who Came In From The Cold
Anatomy of a Domain Hijacking, part 1 Anatomy of a Domain Hijacking, part 1
secretGeek.net domain has been stolen. The site may go down. secretGeek.net domain has been stolen. The site may go down.
Boring article: 'untrusted domain' issue with SQL Server. Boring article: 'untrusted domain' issue with SQL Server.
Coding While You Commute Coding While You Commute
Test Driven Dentistry Is A Good Thing Test Driven Dentistry Is A Good Thing
The 'less crashy' release of NimbleText The 'less crashy' release of NimbleText
Rethinking Toolbars in Visual Studio (or any IDE) Rethinking Toolbars in Visual Studio (or any IDE)
Where shall we have lunch? Where shall we have lunch?
Setting up email for your microIsv Setting up email for your microIsv
The NO Visual Studio movement: Compiling .net projects in Notepad++ The NO Visual Studio movement: Compiling .net projects in Notepad++
ZeroOne: the editor for programmers who think in binary ZeroOne: the editor for programmers who think in binary
Mercurial workflow for personal projects (with a .net bias) Mercurial workflow for personal projects (with a .net bias)
I see you're using vim. Let me fix that for you. I see you're using vim. Let me fix that for you.
The worst recruitment spam I've ever read The worst recruitment spam I've ever read
A thank you I forgot to say A thank you I forgot to say
My new product, NimbleText, is live My new product, NimbleText, is live
Grabbing the free songs of Jonathan Coulton (with Powershell) Grabbing the free songs of Jonathan Coulton (with Powershell)
Using NimbleSet to compare lists Using NimbleSet to compare lists
Wanted: Wiki Lists (dot org) Wanted: Wiki Lists (dot org)
DOS on Dope: The last MVC web framework you'll ever need DOS on Dope: The last MVC web framework you'll ever need
JSON Query Languages: 5 special purpose editors JSON Query Languages: 5 special purpose editors
What then, is b? What then, is b?
SQLike: A simple editor SQLike: A simple editor
Yet Another BizPlan Generator. Yet Another BizPlan Generator.
HOT GUIDS: A hot or not site for guids HOT GUIDS: A hot or not site for guids
How does life get better? One tiny hack at a time. How does life get better? One tiny hack at a time.
24 things to do, and 100 things *not* to do (yet) for building a MicroISV 24 things to do, and 100 things *not* to do (yet) for building a MicroISV
Venture capital won't kill Jeff Atwood, it will only make him Jeffer. Venture capital won't kill Jeff Atwood, it will only make him Jeffer.
A handy workflow image for newbie mercurial users A handy workflow image for newbie mercurial users
Fractal Feedback, a diversion into recreational programming Fractal Feedback, a diversion into recreational programming
Hump-Jumping: How the Education of Computer Science can be Saved, err, maybe. Hump-Jumping: How the Education of Computer Science can be Saved, err, maybe.
Suggested User Experience Improvements for DiffMerge Suggested User Experience Improvements for DiffMerge
SQL Style Extensions for C# SQL Style Extensions for C#
The Movie Hollywood (And My Wife) Doesn't Want You To See: Weekend at Jacko's The Movie Hollywood (And My Wife) Doesn't Want You To See: Weekend at Jacko's
Sysi: the ultimate administrators toolkit Sysi: the ultimate administrators toolkit

Archives .: secretGeek :: Complete Archives
TimeSnapper -- Automated Screenshot Journal TimeSnapper.com    
Version 3.3: true productivity boost

Next Action NextAction
Managing the top of your mind

NimbleText -- World's Simplest Code GeneratorNimbleText -- World's Simplest Code Generator, Text Manipulator, Data Extractor

25 steps for building a Micro-ISV 25 steps for building a Micro-ISV
3 minute guides -- babysteps in new technologies: powershell, JSON, watir, F# 3 Minute Guide Series
Universal Troubleshooting checklist Universal Troubleshooting Checklist
Top 10 SecretGeek articles Top 10 SecretGeek articles
ShinyPower (help with Powershell) ShinyPower
Now at CodePlex

Realtime CSS Editor, in a browser RealTime Online CSS Editor
Gradient Maker -- a tool for making background images that blend from one colour to another. Forget photoshop, this is the bomb. Gradient Maker


[powered by Google] 


How to be depressed How to be depressed
You are not inadequate.



Recommended Reading


the little schemer


The Best Software Writing I
The Business Of Software (Eric Sink)

Recommended blogs

Jeff Atwood
Joseph Cooney
Phil Haack
Scott Hanselman
Julia Lerman
Rhys Parry
Joel Pobar
Thomas White
OJ Reeves
Eric Sink

Aggregated Links

proggit
dzone
hacker news
dot net kicks

Human Link Machines

interesting finds
a continuous learner's weblog
arjan's world
weekly link post

LinkedIn profile
LogEnvy - event logs made sexy
Computer, Unlocked. A rapid computer customization resource
PC Smart Buys - Computer Hardware in Australia
 
home .: about .: sign up .: sitemap .: secretGeek RSS .: © Leon Bambrick 2003 .: privacy

home .: about .: sign up .: sitemap .: RSS .: © Leon Bambrick 2003 .: privacy