Figure 1-2. Choosing the target version of the .NET Framework
CHAPTER 1 n INTRODUCING WPF 13
To really understand how the Visual Studio multitargeting system works, you need to
know a bit more about how .NET 3.5 is structured. Essentially, .NET 3.5 is built out of three
separate pieces??”a copy of the original .NET 2.0 assemblies, a copy of the assemblies that
were added in .NET 3.0 (for WPF, WCF, and WF), and the new assemblies that were added in
.NET 3.5 (for LINQ and a number of miscellaneous features). However, when you create and
test an application in Visual Studio, you are always using the .NET 3.5 assemblies. When you
choose to target an earlier version of .NET, Visual Studio simply uses a subset of the .NET 3.5
assemblies.
For example, when you choose to target .NET 3.0, you effectively configure Visual Studio
to use a portion of .NET 3.5??”just those assemblies that were available in .NET 2.0 and
.NET 3.0. There??™s a potential stumbling block in this system. Although these assemblies are
treated as though they haven??™t changed in .NET 3.5, they aren??™t completely identical to the
.NET 2.0 versions. For example, they may include performance tweaks, bug fixes, and (very
rarely) a new public member in a class. For that reason, if you build an assembly that targets
an earlier version of .
Pages:
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97