0

I'm using Visual Studio Community 2022 (64-bit), Version 17.1.6 according to VS Help->About but 17.3.2 according to VS Installer, on Windows 10. I've been programming in C# for some time and decided to try C++.

I downloaded the workload Desktop development with C++ through VS Installer->Modify. But I cannot see the C++ project templates in the Create a new project form.  enter image description here

If I click Next in the above form, a C# project is created. Using VS Installer I

  • run Repair VS
  • uninstalled Desktop development with C++ 
  • installed Desktop development with C++ again.

  When I start VS from VS Installer->Launch, I get a long list of C++ templates. enter image description here

But when starting VS directly, without Installer, no templates are found.

Kalle Svensson
  • 353
  • 1
  • 10
  • 1
    ¿Perhaps you are switching to different user? – user7860670 Aug 30 '22 at 07:44
  • Most (if not all) of the Windows desktop templates require that you install MFC, which you have to install individually, not as part of a workload. Slightly dated but still roughly accurate directions: https://stackoverflow.com/a/43075169/179910 – Jerry Coffin Aug 30 '22 at 07:54
  • @user7860670: No, I'm not. – Kalle Svensson Aug 30 '22 at 08:00
  • @Jerry Coffin: Thank you, I''ll look at it. But it does not explain why I cannot see the project templates **if** VS is started directly. – Kalle Svensson Aug 30 '22 at 08:03
  • Was the first picture opened with **Blend For Visual Studio**? – Minxin Yu - MSFT Aug 30 '22 at 08:11
  • @Minxin Yu - MSFT: I did open Blend For Visual Studio for a while. But I closed it and the PC was restarted after VS Repair. The reported problem occured both before Repair-Restart and after Repair-Restart. The problem exists in Visual Studio, I did't try to use Blend For Visual Studio, I only opened it shotly. – Kalle Svensson Aug 30 '22 at 08:21

1 Answers1

0

I have found the reason for this behavior. I start VS using an icon (shortcut) pinned to start in Windows 10. This icon was pointing at an old version of VS. When VS was updated and a new workload was added, this icon still pointed to the old VS version. 

I removed this icon and created a new one, and everything works fine now.

A VS shortcut points at ..\Microsoft Visual Studio\2022\Common7\IDE\devenv.exe. In my case, there were two copies of this file tree; one under C:\Program Files\ and the other under D:. The other was correct, but at some update VS Installer neglected this configuration and selected the C: drive by default.

Kalle Svensson
  • 353
  • 1
  • 10
  • Hi ,glad to know you've found the solution to resolve this issue! Please consider accepting it as an answer to change its status to Answered. See [can I answer my own question..](https://stackoverflow.com/help/self-answer), Just a reminder :) – Minxin Yu - MSFT Sep 02 '22 at 01:20