I noticed some discrepancies with the output of this relevance and the applicability of the .NET 4.5.2 install fixlet, so I did some digging. Interestingly enough, Microsoft posted a separate article on “finding .NET versions installed” (below) and used a completely different method in the other post. It uses the registry instead of the clr.dll file. I’ve written relevance that uses the data from that article to return the .NET version and it seems to be working for me now. Hopefully others will find this useful.
https://msdn.microsoft.com/en-us/library/hh925568(v=vs.110).aspx
if(exists key "HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP" of native registry)then((if(exists key "v4" whose (exists key "Full" whose (exists value "Release" of it) of it) of it)then(((if(it = 378389)then("4.5")else(if(it = 378675 OR it = 378759)then("4.5.1")else(if(it = 379893)then("4.5.2")else(if(it = 393295 OR it = 393297)then("4.6")else(if(it = 394254 OR it = 394271)then("4.6.1")else(if(it = 394802 OR it = 394806)then("4.6.2")else("Unknown v4.x release - " & it as string))))))) of value "Release" of key "Full" of it) of key "v4" of it)else(maximum of (values "Version" of keys of it as string as version) as string)) of key "HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP" of native registry)else("Not Installed")