For your own project, sure you know what Visual Studio version you are using to develop it. But for other projects downloaded from the Internet such as github, how to check the VS version the developers used to develop the project? You can get to know what version of Visual Studio that was used to develop an application by checking the solution file: (i.e. .sln file of the project). The first several lines of the .sln file would be like:
Microsoft Visual Studio Solution File, Format Version xx.00
# Visual Studio Version yy
VisualStudioVersion = yy.x.xxxxx.xxx
Here yy is the Visual Studio version: 15 means VS 2017, 16 means VS 2019, 17 means VS 2022(reference). Don’t confuse it with the format version(xx) of the .sln file. The solution file format version keeps 10 from VS2013 till VS 2019 but upgraded to 12 for VS 2022.
Note that the VS version is in the solution file(.sln) not in the project file(like .csproj)