As Hans Passant mentioned in the comments, the CLR contains a retargeting mechanism for framework assemblies that redirects references to old framework libraries to newer ones. You can see that mechanism at work by looking at the Fusion Log (using fuslogvw.exe
and configuring it to log all binds to disk), which contains the information "Version redirect found in framework config":
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\Users\fabian.schmied\Desktop\Temp\ConsoleApplication3\ConsoleApplication3\bin\Debug\ConsoleApplication3.exe.Config
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Version redirect found in framework config: 2.0.0.0 redirected to 4.0.0.0.
LOG: Post-policy reference: System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
LOG: Found assembly by looking in the GAC.
In your sample, the Fusion log contains an equivalent line:
LOG: Version redirect found in framework config: 4.0.99.99 redirected to 4.0.0.0.
From that, I conclude that the same mechanism comes into play here. It seems that all references to System.Data
up to 4.0.65534.65534 are redirected to 4.0.0.0.
(For versions starting from 4.1.0.0, the retargeting no longer kicks in.)