Home > database >  How can I know which version of Visual Studio a Visual Studio solution is created by?
How can I know which version of Visual Studio a Visual Studio solution is created by?

Time:12-24

I need to build a C# solution but do not know which version of Visual Studio it was created by. I installed Visual Studio 2017 but got build errors like:

CS1617 Invalid option 'preview' for /langversion. Use '/langversion:?' to list supported values.

I opened the .sln file with an editor and saw the following lines:

   Microsoft Visual Studio Solution File, Format Version 12.00   
   #Visual Studio 15   
   VisualStudioVersion = 15.0.28010.2050  
   MinimumVisualStudioVersion = 10.0.40219.1

I'm confused about the numbers. Why is the format version different from the VisualStudioVersion. Does Visual Studio 15 mean Visual Studio 2015? If not, is there a list showing the correspondence between the VisualStudioVersion and real Visual Studio commercial names?

CodePudding user response:

As written in this article, 2022 starts with 17 start as a major release

Regarding the documents corresponding to the currently commonly used 2022, 2019, and 2017 versions, thanks to shingo for the proposal.

They are:

2017->15

2019->16

2022->17

Usually you can open programs compiled in previous versions in the latest version.

  • Related