Version .NET 4.0 has made big changes in the way assemblies are built. Previously, the reference assembly was a simple copy of the runtime assembly, which is stored in the GAC. This, however, caused some painful problems. The overload WaitHandle.WaitOne(int) noteworthy; it was added to the .NET 2.0 update with Service Pack 2 (also known as .NET 3.5). Programmers used it, not noticing that it was an added method, the version number of the mscorlib assembly was still 2.0.0.0. But then they discovered that their program failed to launch on an unsupported version of .NET 2.0. A very nasty kaboom, MissingMethodException without a hint why such a general method might be missing.
To prevent this gap, .NET 4.0 link assemblies are stored separately in the "% programfiles% \ Reference Assemblies" directory, as you know. And they are special assemblies; they contain only metadata with all ILs. This is why the assembly is much smaller.
Microsoft can now improve .NET 4 code and add public classes and methods without causing this kind of breakdown. And they did it abundantly, updates 4.01, 4.02 and 4.03 were sent since the release of version 4.0.
Thus, the reason you came across the DataContractSerializerSetting class is easily explained, it just does not appear in the control assembly. It was probably added in one of these additional updates. And you should not try, your program will crash on a machine that does not have an update. You must wait until .NET 4.5, the version that added it to the referenced assembly. You can call the Hell DLL if you want.
Hans Passant Mar 14 2018-12-12T00: 00Z
source share