Why do I have to specify the target framework in Visual Studio?

by Liquid Core   Last Updated January 12, 2018 18:05 PM

Everyone seems talking easy about it but I don't get it.

.NET Standards is a subset of functionalities of every .NET frameworks that you have to follow if you want to make your framework or whatever if you want to make it .NET Standard compliant and so compatible on all the platforms .NET can target.

Then why I have to specify manually "netstandard20", "net461" and so on in targetframework?

Shouldn't it be compatible with everyone?

What's even the sense of targenting himself "netstandard20"?

Tags : c# .net


Answers 1


Visual Studio allows you to target different frameworks because some of us still have to support older operating systems or other software that does not use the newer frameworks. If you doubt the veracity of this statement, just do a Google search for Internet Explorer 6, and bask in the hate of the people who still must support it in some way because their clients are unable or unwilling to upgrade their Model T.

It's incredibly useful for your IDE to be able to tell you "You can't use that keyword or method overload, because it doesn't exist in .NET 3.5."

Robert Harvey
Robert Harvey
January 12, 2018 17:39 PM

Related Questions