Incompatibilities between Framework 2.0 and 3.0 versions on Vista vs XP

The human mind treats a new idea the same way the body treats a strange protein; it rejects it.
- PB Medawar

Hans Passant, an MVP and moderator of one of the MSDN Forums, found some interesting items:

The .NET 3.0 version of the framework as installed on Vista is not the same as the one installed on XP SP2. On Vista, the setup utility overwrites all the V2.0 assemblies and upgrades them from version 2.0.50727.42 to 2.0.50727.312.

There are some differences between the 42 and the 312 revisions of mscorlib.dll and System.dll. There are indeed a few places where 312 explicitly checks for Vista. There are several places where a SecurityPermission attribute is changed from InheritanceDemand to LinkDemand. And what looks like bug fixes in PerformanceCounter, FileWebRequest, RuntimeMethodInfo and UdpClient. Hans says that WaitHandle is the most visible class with new exceptions being thrown.

There's also a potentially breaking change in HttpServerUtility that was discovered by Juan Llibre. It has now acquired a TransferRequest() method that is not present in the 42 revision. If you use this method, your code will not run on XP. The online version of the MSDN library appears to be accurate and up-to-date for the Vista version.

In the V3.5 Beta1 version of the framework, its setup utility silently overwrites the 42 revision with a 1318 revision. The changes in mscorlib and system are far more intense with many bug fixes.

I post this information because recently a user on our eggheadcafe.com forums complained that the Directories.GetFiles() overload that accepts SearchOptions.AllDirectories parameter fails on Windows Vista with "phantom directory" exceptions like:

TYPE: System.UnauthorizedAccessException
MSG: Access to the path 'C:\Users\david\documents\My Videos' is denied.
SOURCE: mscorlib
SITE: WinIOError

Most likely, because the app was built on a Windows XP machine...

Umm, I'm glad we're doing bug fixes -- but when we start breaking cross-OS versioning in DotNetFx, then I start getting a little nervous.

Comments

  1. Anonymous6:55 PM

    Hi Peter,
    by chance did you ever work for Goldleaf Technologies in the banking industry?

    ReplyDelete

Post a Comment

Popular posts from this blog

FIREFOX / IE Word-Wrap, Word-Break, TABLES FIX

Some observations on Script Callbacks, "AJAX", "ATLAS" "AHAB" and where it's all going.

IE7 - Vista: "Internet Explorer has stopped Working"