Resolved: Unable to change the active target framework in Visual Studio

In this post, we will see how to resolve Unable to change the active target framework in Visual Studio

Question:

My C# class library targets several versions of .NET.
But as I edit the code, it seems to show .NET Standard as the active target by graying out lines that are for non-.NET Standard targets.
enter image description here
My question is: Where is this set? How does it determine which target is the active target. I’ve looked everywhere but can’t see how to change this.

Best Answer:

Use the drop down at the top of the document to change your target framework.
enter image description here

If you have better answer, please add a comment about this, thank you!

Source: Stackoverflow.com