0

Edit: After wait too long, I have resorted to do a clean install of Windows 7.
It solves everything.
I believe the cause is : some Windows files, or some service are disabled, by me or virus.
Now, I can no longer test any solution so I accept the existing useful one.


Original Question

My Visual Studio 2017 can run & compile C++ code, but :-

  1. (main problem) can't install any Extension (double click .vsix yield nothing)
  2. double click .sln will popup "Choose Application" that shows no choice. (but "Open with..." works OK)

This issue happens only to my computer in workplace.
It had worked OK before I cleaned up my system.

I tried :-

  1. install, uninstall and repair Visual Studio 2017 several times.
  2. https://github.com/Microsoft/VisualStudioUninstaller
  3. %ProgramFiles(x86)%\Microsoft Visual Studio\Installer\resources\app\layout\InstallCleanup.exe -full then reinstall (can remove "(2)", but not other symptom)
  4. update to the latest version 15.9.17
  5. (Thank comment from Jeaninez - MSFT) Make sure my .sln start with this at the first line:-

    Microsoft Visual Studio Solution File, Format Version 12.00
    # Visual Studio 15
    

enter image description here

I believe the issue is related to Microsoft Visual Studio Version Selector.
This symptom might come after I uninstall VS2019.
My system might be broken?
Perhaps, the cause may be somethings very deep in OS. I am considering reinstall Windows 7.

Reference:

cppBeginner
  • 1,114
  • 9
  • 27
  • "…works correctly except…" aka "…does _not_ work correctly…". – Uwe Keim Oct 28 '19 at 06:31
  • @Uwe Keim Thank. I just clarified the question to state that it can run & compile C++ code. – cppBeginner Oct 28 '19 at 06:33
  • The number (2) corresponds to default nickname.As far as I'm concerned, the first Visual Studio 2017 you did not uninstall clean.I suggest you uninstall it from visual studio Installer. Have you tried adding this code?"Microsoft Visual Studio Solution File, Format Version 15.00 # Visual Studio 2017 " – Jeaninez - MSFT Oct 28 '19 at 09:28
  • @Jeaninez - MSFT ... No. I didn't try it because I don't think my main problem is solution(sln)-related. I understand what you are trying, thank. – cppBeginner Oct 28 '19 at 13:16
  • 1
    Have you installed the other version of visual studio? The Visual Studio is not shown in the " open with " List after set it in the Microsoft Visual Studio Version Selector.Hope this [link](https://social.msdn.microsoft.com/Forums/vstudio/en-US/09e4e52a-7de6-4da8-8903-044644329e27/unable-to-open-sln-file-choose-the-application-to-open-this-file-with-empty-list?forum=vssetup) can help you. – Jeaninez - MSFT Oct 29 '19 at 03:11
  • @Jeaninez - MSFT ... With standard "open with", it found my VS2017 correctly. (sorry if it was not clear) Yes, I did try to install VS2019, but it was too buggy, so I uninstalled VS2019 (then clean-up, and uninstall/install VS2017 several times). My problem might start from there. – cppBeginner Oct 29 '19 at 03:31
  • It may be that you did not completely uninstall the visual studio each time. [Uninstall Visual Studio](https://learn.microsoft.com/en-us/visualstudio/install/uninstall-visual-studio?view=vs-2017) – Jeaninez - MSFT Oct 29 '19 at 06:24

1 Answers1

1

To install extensions, try to find VSIXInstaller.exe on your disk. Normally it is installed here:

c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VSIXInstaller.exe

Sergey Vlasov
  • 26,641
  • 3
  • 64
  • 66
  • Thank. It might be exactly the thing that I need. Unfortunately, I can't experiment it. (just re-install Windows a hour ago) +1 – cppBeginner Oct 29 '19 at 10:16