.net - TargetFramework FrameworkDisplayName empty -


what effective difference between following assembly attributes - is, runtime difference, if any, might occur.

[assembly: targetframework(".netframework,version=v4.5.2",                              frameworkdisplayname = "")]  [assembly: targetframework(".netframework,version=v4.5.2",                            frameworkdisplayname = ".net framework 4.5.2")] 

the 1st produced msbuild (with warnings) when build machine not have 4.5.2 reference assemblies (via targeting pack) installed. 2nd produced when build machine has reference assemblies installed (the warnings disappear). feel 2nd somehow more correct, don't have concrete facts support this. both binaries appear work.

targetframework

identifies version of .net framework particular assembly compiled against.

the targetframeworkattribute attribute can specify frameworkdisplayname property provide more descriptive .net framework version string suitable displaying clients of assembly

source: https://msdn.microsoft.com/en-us/library/system.runtime.versioning.targetframeworkattribute(v=vs.110).aspx

frameworkdisplayname

gets display name of .net framework version against assembly built.

source: https://msdn.microsoft.com/en-us/library/system.runtime.versioning.targetframeworkattribute.frameworkdisplayname(v=vs.110).aspx

the example below emphasis correctness of 2nd line mentioned:

the following example applies targetframeworkattribute assembly , assigns both property values indicate assembly built using .net framework 4.5.2.

using system; using system.runtime.versioning;  [assembly:targetframework(".netframework,version=v4.5.2",            frameworkdisplayname = ".net framework, version 4.5.2")]  namespace mycompany.utilities {    public class stringlibrary    {       // members defined here.    } } 

i hope clears question.


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

jquery - javascript onscroll fade same class but with different div -