What actually happens when you target the .NET 3.5 framework in Visual Studio? What does that actually do? Does it somehow "flag" any of the output files and associate them with the framework version?
A:
It sets an attribute in the .csproj file:
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
and updates any references to namespaces if they require the newer version:
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
This tells the compiler which version of the namespace and hence dll it needs to link against.
ChrisF
2010-06-10 21:48:04