Website hosted on IIS contains multiple AssemblyFileVersionAttribute, what causes an error when calling FrameworkDescription property

Alexey Gr 1 Reputation point

If host a site (asp net framework 4.8) on IIS (win server 2019), then System.Runtime.InteropServices.RuntimeInformation.FrameworkDescription property call - throws an exception:

AmbiguousMatchException: Multiple custom attributes of the same type found.

If you try to get the attribute manually, then you can see that there are really two of them


Windows Server 2019
Windows Server 2019
A Microsoft server operating system that supports enterprise-level management, data storage, applications, and communications.
2,633 questions
Internet Information Services
A set of technologies in the .NET Framework for building web applications and XML web services.
1,475 questions
{count} votes