I am facing problem, I want to write c++ code in visual studio 2015, but I can\'t create c++ project because there is no c++ template in the New Project window.
I a
Go to the online
menu (it's below Recent
and Installed
. There you'll be able to download C++ templates and samples. See this MSDN article which describes it in greater details.
The VS2015 installer does not install C++ by default.
Since you already have Visual Studio installed, you can modify the existing install.
That should do it. You may have to insert the install media or suffer through a download, but these days Windows caches the installer info so everything needed may already be present on your system.
While most users will be unblocked by the accepted solution, there is another scenario where Visual C++ is not working as intended for VS2015.
I was installing both VS2015 and VS2017 on the same system on the same day. Long story short, I got this person's problem.
From the link:
I am also running into this -- but in my case, I also installed full VS2015 Pro. It shows that the VC++ common tools are installed, but they are not on disk in the usual location, they seem to be in the MSVS/Shared folder (Program Files (x86)/Microsoft Visual Studio/Shared/14.0/VC/bin/cl.exe reports version 19.00.124218.2). Uninstalling VS2015 removes these, and reinstalling puts them back in Shared.
For me at least, it goes worse than just the batch files -- I can't actually create any C++ projects. Trying to create one just causes the "New Project" window to pop up again; no error, no warning.
No amount of uninstalling components from both 2015 or 2017 got me into a usable state (Shared\14.0\VC still persisted as the install dir, I couldn't find what component was keeping those tools on-disk and preventing them from being removed). I ended up just copying the contents of "Microsoft Visual Studio/Shared/14.0" into the "Microsoft Visual Studio 14.0" folder -- a gross hammer, and VS2015 still can't create C++ projects, but it got me unstuck, and existing build systems started finding tools again.
VS team -- I totally get the goals of the layout change, and I love what you guys are doing with VS overall. But please treat this as a major bug; you can't decide to permanently change the location of build tools that have been in one place for multiple years, as it will break many, many existing build systems. At best, install them in both locations; let VS2015 manage the "Visual Studio 14.0/VC" dir like it always has, and let VS2017 manage the Shared/14.0 dir (via the "VS2015 C++ build tools" package). They should be unrelated.
C:\Windows\Temp
and %temp%
If you can do that, you're unblocked. Otherwise, yikes! I don't know what to do next short of a full registry deep-dive keyword purge or a re-install of Windows. With an SSD, the latter is probably faster TBH.