Most (if not all) C # libraries (and F # and VB) and executable projects created in Visual Studio have an automatically added file app.config
that indicates the version of execution and the target frame nickname (TFM):
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0" />
. . .
Even without a file app.config
, the compiler always generates an assembly-level attribute, as ILDASM shows:
.custom instance void [mscorlib]System.Runtime.Versioning.TargetFrameworkAttribute::.ctor(string) = ( 01
..
bytes snipped-> ..
..
61 )
The file .csproj
contains the target frameworks, and I assume that this is the place where the target is passed from the compiler during the build.
, , <startup>
. , , , , , . Windows.
, " , .NET 4.0, , , ", , , , .
, TFM .config
, , ? .