in Properties, what do Assembly/Platform and Module/Runtime mean?

We are trying to debug some nastiness in our CI environment on which some of our .NET 2.0 assemblies are being overwritten with their .NET 4.0 cousins. I thought dotPeek would be a great tool for that. However, I am getting very confused.
Here is a screenshot of our log4net.dll assembly for example:
2015-02-17_1041.png
As you can see, the Assembly Platform property says ".Net Framework v4.0" while the Module Runtime says "v2.0.50727 / msil"

Which one reflects the actual framework "requested" by that assembly?

And maybe, I am going at this all wrong. How would one find out which assembly in the dependency chain only supports v4.0?

Regards,

Eric.

1 comment
Comment actions Permalink

From looking at this same sort of issue I have concluded that the Platform property is wholly unreliable.

E.g. a project targeting the following versions of the .NET Framework will result in these Platform values:
                   

Target .NET Framework dotPeet Platform
v4.0 .Net Framework v4.0
v4.5 .Net Framework v4.5
v4.5.2 .Net Framework v4.0


In all cases the runtime (which is the most important info) is 4.0.* e.g. v4.0.30319.

I'm not even sure where the value for this property comes from because in the assembly manifest (seen with ildasm) the [mscorlib]System.Runtime.Versioning.TargetFrameworkAttribute is always set correctly. I would use this framework tool to examine your assemblies and look for the aforementioned attribute value.

0

Please sign in to leave a comment.