'Question on .Net Standard and multiple TFMs

We are converting bunch of libraries which were in .Net Framework to .Net Standard 2.0. I have couple of questions on the topic.

  1. Is there any advantage specifying multiple TFMs along with .Net Standard 2.0? I have been doing as below without knowing any implications here.

    netstandard2.0;net461;net5.0

  2. Additionally, one of the library had following code. If the TFM is set to .Net standard 2.0, I don't see any error but if TFMs are set as above then I can see errors as in below image that HttpUtility it is not supported in .Net 4.6.1. Why is it like that? I was expecting that if the library is built with .Net standard 2.0 and the client project is .Net 4.6.1 then the client project will throw an error that HttpUtility is not allowed in .Net 4.6.1. But I don't see any errors either.

Can someone help me to understand this problem?

enter image description here



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source