*sigh*

Unfortunately my idea for rerouting assemblies to 1.0 programmatically does not work. The problem is that there is not currently a way to unload an assembly (to the best of my limited knowledge). If you could, what I would do is prevent it from trying to unload the referenced assemblies and load the 1.0 assemblies instead.

What REALLY needs to happen (and I'm surprised MS hasn't figured this out already) is that there needs to be a <Assembly: CLRCompatibility> attribute available for the AssemblyInfo.* file that allows the developer to programmatically determine whether the assembly will try to run against 1.1, 1.0, or can run on both. Then server controls and other file.config-less classes can still have version compatibility information.

Also missing is a compatibility tester from MS that will load up your assembly and tell you whether it will run against specific versions of the framework or not.

I guess what I REALLY hope is that people that work at MS <*ahem* Scoble, Sells, ScottGu, Rob, Don, et al. /> might catch a glance of this blog entry and figure out how to accomplish what I just stated. Maybe a non-b0rg could figure it out as well? One can only hope.

4 Comments

  • I already thought I was crazy. I got a truckload of crap thrown over me yesterday that I was wrong, giving bad advice etc. but I'm not. It IS a problem. I'm glad someone else finally understands what I'm talking about.





    In the comments on my blog about this problem an NUnit developer posted a piece of code which might help. I'll test that today, perhaps it's a solution.

  • Frans,





    It's not as big a problem as you're making it out to be, and if you read my previous post, I flamed you too for making that comment. Other peoplr read this stuff and you need to be careful.





    Go back and read the link to my first post on the subject and re-read what I wrote. I've been supporting 2 versions of my code without incident for 6 months now. Don't get all Henny Penny on everyone, that's all. We want people to stop using VS.NET 2002. That's not gonna happen if people read stuff like &quot;ISV's - DONT USE 2003&quot;

  • Besides all this, your primary concern should be ease of use to end users, not the time you have to put into making it work. Having 2 separate versions is just good policy... removes confusion or configuration issues.





    You could include both versions in your redistributable and use Strong Name Signing and versioning similar to MS's to specify which version is which.

  • Why is it such a bad position? I think it's perfectly acceptable. Why are we so damn hell-bent on supporting old technology? MS is offering an incredibly cheap deal in allowing upgrades for $29. The goal is to get you to do it now. If you wait till later, I have absolutely no sympathy for you. You snooze, you lose.





    You can always command line compile your stuff too. You don't NEED VS.NET 2003 if you just want to recompile to 1.1.

Comments have been disabled for this content.