How can I check what version/edition of Visual Studio is installed programmatically?

前端 未结 10 1128
萌比男神i
萌比男神i 2020-12-16 09:16

I could read registry HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\10.0. However, it doesn\'t give me any information about the edition of it - Profes

10条回答
  •  盖世英雄少女心
    2020-12-16 09:47

    An updated answer to this question would be the following :

    "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -latest -property productId
    

    Resolves to 2019

    "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -latest -property catalog_productLineVersion
    

    Resolves to Microsoft.VisualStudio.Product.Professional

提交回复
热议问题