i have installed the Visual Studio 2015, but there is no C++ Project.?

前端 未结 3 1657
一整个雨季
一整个雨季 2021-01-14 14:53

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

相关标签:
3条回答
  • 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.

    0 讨论(0)
  • 2021-01-14 15:01

    The VS2015 installer does not install C++ by default.

    Since you already have Visual Studio installed, you can modify the existing install.

    1. On Control Panel->Programs and Features (or run appwiz.cpl) find and run the Installer for Visual Studio 2015.
    2. Wait for Installer dialog to load.
    3. Click the Modify button on the bottom of the installer dialog.
    4. On the Features Tab, expand Programming Languages.
    5. Select Visual C++.
    6. Click the UPDATE button on the bottom right.

    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.

    0 讨论(0)
  • 2021-01-14 15:07

    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.


    Fix:

    1. Uninstall all copies of Visual Studio
    2. If you have frameworks that can install copies or partial copies of Visual Studio, or rely on them, consider uninstalling them too. For me, this was a couple versions of Qt.
    3. Nuke C:\Windows\Temp and %temp%
    4. Nuke anything visual studio related in C:\PROGRA~1,2,3, %appdata%, and %localappdata%
    5. Reboot
    6. Install the oldest version of Visual Studio you want to use first
    7. Try to build a C++ Win32 console app with that version

    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.

    0 讨论(0)
提交回复
热议问题