Visual Studio 2015 Missing Universal templates - c++

I've been having this problem for about a month, and I am completely stuck.
Under the "New Project" window I don't see the windows 10 universal templates, but have the sdk and tools installed.
All pictures are in this folder on dropbox.
New Project Window: Capture.png (on dropbox)
What I tried:
.net 3.5 enable/disable under "programs and features"/"Turn Windows features on or off"
full uninstall/reinstall with VisualStudioUninstaller
full uninstall/reinstall with Revo Uninstaller
iso intaller
running "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE>devenv /installvstemplates" command with admin privileges
repairing with original installer
modifying with original installer
The strange thing is that in the installer (when modifying) the Universal Windows App Development checkbox is checked. (Capture1.png ... Capture5.png)
I have, however, found out that the folders at "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\ProjectTemplates\VC\Windows Root\Windows UAP\1033" is completely empty... Isn't that supposed to be the template folder for the projects? (Capture6.png)
I would be grateful if you could give me some advice fixing this issue.

Okay, so for anyone having this problem:
Check if the "Windows Installer" service is running under Task Manager/Services.
If not right click and select Start service.
After that run the installer for Visual Studio and select repair.
After the repairing finishes, (reboot if you want, it wasn't required for me) all the templates are installed.
(And yes, if you still have this problem, write to microsoft, they are helpful in these kinds of questions)

Related

Visual Studio: copy installation folder and setup it up to be auto-detected by Qt Creator

I wiped out an old Windows 10 and replaced it with a new Windows 10 by ISO image.
Before wiping out, I copied the folder of Microsoft Visual Studio 2017 Community Edition on old Windows to an external hard disk:
xcopy /E "C:\Program Files (x86)\Microsoft Visual Studio" D:\
Now after reinstalling Windows 10, I copied the VS 2017 folder from external the hard disk to the C:\Program Files (x86)\ folder of new operating system.
I did so to avoid having to download VS 2017 again on new OS.
The problem is other software, like Qt Creator, cannot auto-detect the VS C/C++ compilers. I guess that's because the VS 2017 isn't added to path.
The questions are:
What path should I add to system path in order to VS 2017 to be auto-detected by other software like Qt Creator?
Is there any script which I can run to automatically integrate the VS 2017 to the rest of the operating system.
To answer the questions in your issue:
Copying the content of C:\Program Files (x86)\Microsoft Visual Studio folder is not a recommended way to install VS.
(The complete installation will not only set the Environment variables but also set the related registry keys and values. A simple copy may break this process)
So we always suggest that users install the VS by vs-installer or offline installation package. (Same like what Zlatomir suggests.)
To your actual requirements:
It seems you're just trying to use VC++ compiler in QT Creator instead of developing QT projects in Visual Studio. So build tools for VS package is enough for you.
See this related issue, if we download Build Tools for VS package with corresponding C++ workload, then we can get the compiler the QT needs. There's no need to install the VS IDE for this situation.
And if we need C++ compiler from VS2017, download the Build Tools for VS2017, if we need C++ compiler from VS2015, download the Build Tools for VS2015 Update3. Link of old version about VS Tools see here.
Update:
From the the link older downloads we can see:
Choose the download button according to which version we need. We can find both VS2017 build tools package and VS2015's there.
Usually programs on Windows don't work after you just copy the installation folder.
So right now there is little you can do to fix it, even if you partially fix, you have no way to know if something else will be broken in the future.
So the recommended solution is to download the installer again and create an offline installer for the next time this happens, you can do that by running the online installer with the following parameters: vs_community.exe --layout c:\vslayout --lang en-US (replace vs_community.exe with the actual name of the online installer file, or rename it), for more options, that might require a smaller download (example if you only need native and don't need .net) check the documentation here for the full set of options you have.

The setup for this installation of visual studio is not complete, really?

I have been using Vs 2017 for several months on dev machine. This fine morning says setup incomplete. Am I missing something?
In this case you need to go to Control Panel => Programs and Features and choose Visual Studio and update it.
VS 2017 (15.6.6) was fine for me on Friday 6/1/18 on Windows 10, but same issue as OP today after a restart.
As suggested by the dialog and Retired Ninja, I ran the Visual Studio Installer (to 15.7.3 after updating VS Installer) and that fixed it.
Note that the 15.7.3 update was a 7.73 GB download. Your download size may vary.
This has happened to me for the last 3 upgrades in Visual Studio Enterprise 2017 (now again on upgrade to 15.9.21).
The fastest fix (and I'm not sure why) is simple and doesn't bomb your settings or take for ever.
In the Visual Studio Installer, click on Modify.
Click "Modify" on the bottom right corner.
Yes it says "Total space required 0 KB".
Yes you didn't really change anything.
It will then act like it is downloading something. (not sure what)
It will then act like it is installing something. (again, not sure what)
Open Visual Studio 2017 and it works.
Hope this helps.
If you have an offline installation like me and can't simply re-run the Visual Studio Installer you can edit devenv.isolation.ini and change the last line to read SetupFinished=true. It will detect your trickery and complain, but at least it will launch again.
Edit: I ended up getting the Visual Studio Installer to fix the issue after choosing the "Download then Install" option. Maybe I was too impatient when I initially stopped the update? My above answer is useful when you need to get work done that isn't affected by the broken features, but you will likely encounter problems later on.
just had the same problem (without any reason with) vs 2019 prof, after googling and reading on that topic, just went to vsix, looked for some individual component to install/uninstall, randomly picked cloud explorer, uninstalled it and some dependent components and VS 2019 prof started normally
decided to leave this here. may be it helps somebody
Solved: I did following steps, run the visual studio and it works for me.
In my case visual studio was working fine , I just restarted the PC, this popup was keep coming when I try to open visual studio.(in my case I was using VS 2019)
Go to this path "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE"
Open devenv.isolation.ini, set SetupFinished=true and save.
Now open visual studio.
Cheers!
In my case did following steps:
Clear temp files (you can %temp% in run command and Shift+Delete files)
Restart your computer
Open visual studio it will work properly.
Update: Faced problem again after couple of days, This time I go to C:\Program Files (x86)\Microsoft Visual Studio\Installer.
Click on retry.
Select one more feature which I had already installed on my Visual Studio
Click on modified and after installation it worked again.
This happened to me after I canceled a plugin update.
I solved by going to this site that has the latest update of Visual Studio.
https://learn.microsoft.com/en-us/visualstudio/releasenotes/vs2017-relnotes
I downloaded and upgraded it.
After that, Visual Studio worked.
If your VS is already upgraded, thereĀ“s an option to "repair" on the installer.
For this problem, goto uninstall screen in control panel right-click visual studio and select option change, Installer page will open now, In that window without changing anything click modify. it will solve the problem. I'm using VS Professional 2017
I got the same error today morning. This is what I did:
I ran the visual studio installer then I clicked on Modify.
The installer was showing 0KB Required. I continued and then it downloaded and installed. (Not sure what).
After that installation, it was able to launch.
I hope it works for you as well.
I was using Vs 2019 professional 16.6 and happened to me this issue one morning. I modified the installation by adding Azure Development tools even though I was not using it. This fixed the issue.
I just updated to 15.9.24 and I got this yet again, as I have my resolution above, and Visual Studio 2019 seems to be a lot better with avoid this issue. The installer for 2019 you do have to change something and do the modification, 2017 you don't have to change anything.
I reported this issue through Developer Community:
Setup not complete since 15.9.21
I don't know why but sometimes its buggy
it's up to date but after launch visual studio this error prompted !
you have to click modify in vs installer and just modify it.
its not going to download anything.
after a moment launch vs and enjoy :)
For VS2022, WIN11:
Control Panel > Programs > Programs and Features > Microsoft Visual Studio Installer
Then, click on Change and resume the previous process.

Unable to update visual studio installer

Wanted to add this question to the pool in case someone has the same problem
I was unable to update Visual Studio 2017 on Windows 7 and got the following error:
Unable to install the files to target location. Error: The folder
'c:\Program Files (x86)\Microsoft Visual Studio\Installer' or a file
within it is locked by another program. Close any applications that
might be using it and try again.
The initial solution I found was to reinstall Visual Studio but felt that it might be unnecessary. The solution I found was to close down visual studio, go to "c:\Program Files (x86)\Microsoft Visual Studio\Installer", rename the folder "Installer" to something else then run vs_installer.exe from the renamed folder.
Hope that help someone.
I just recently encountered the same error while trying to update the Visual Studio 2017 installer on Windows 10. In my case, the c:\Program Files (x86)\Microsoft Visual Studio\Installer directory was locked because of virus/malware scanning software running in the background. After stopping that, the installation of the VS 2017 installer had no more problems.
What initially misled me about the source of the problem was that the process which had a lock on the files in that directory was the special System process in Process Explorer, so I was initially going down the wrong rabbit hole.
If you have malwarebytes then you can add to the allow list C:\Program Files(x86)\Microsoft Visual Studio and it will work.
I got it working by downloading the installer separately, rebooting, and running the installer directly.
VS Installer Downloads
I encountered this when trying to update VS2019. I could not rename the Installer folder. Rebooting didn't help. I tried uninstalling everything related to Visual Studio via Control Panel, but the uninstall failed. It removed everything except a subfolder containing VSIXAutoUpdate.exe and some dlls. The installer still would not run.
This final step allowed me to delete the Installer folder and do a fresh install of Visual Studio.
Open Task Manager > Processes Tab
End Process "VSIXAutoUpdate"
Delete folder "C:\Program Files (x86)\Microsoft Visual Studio\Installer"
TL;DR
Stop the Task Scheduler service and ensure no open handles for the C:\Program Files (x86)\Microsoft Visual Studio\Installer dir
Details
I just had the same problem, and even rebooting didn't help. So, I dug in!
Process Hacker revealed there was a lock on the following file by the System process:
C:\Program Files (x86)\Microsoft Visual Studio\Installer\resources\app\ServiceHub\Services\Microsoft.VisualStudio.Setup.Service\VSIXConfigurationUpdater.exe.
If I used Process Hacker to close the handle, it just immediately reopened again :/
I thought to check Task Scheduler (since it runs as SYSTEM in svchost), and sure enough there were tasks in there that run VSIXConfigurationUpdater.exe, even though they weren't actually running at that time.
So I stopped the Task Scheduler service, then used Process Hacker to close the handle on VSIXConfigurationUpdater.exe - and this time it didn't return! After ensuring there were no open handles on anything inC:\Program Files (x86)\Microsoft Visual Studio\Installer, the Visual Studio installer was able to update.
I found the culprit for me was Malwarebytes disabled this and all worked well. Hope this helps somebody.
I tried to run through the steps #Janspeed specified, but there were a couple of language folders in the resources directory that were corrupted/locked, so just renaming wouldn't work. I managed to copy most of the file/dir structure (minus the corrupted ones) to a new directory but had to run a chkdsk /f on a restart before I could get those folders freed up and deleted. Once I had this worked out, #Janspeed's steps worked fine, including just deleting the new directory that I had copied everything into.
I ran into this issue today, turns out it was MalwareBytes Endpoint Protection that was blocking the update which is rather annoying.
Luckily I'm the admin and developer so I was able to drop my laptop from the antivirus to enable the update and then re-add it but in a larger corporate environment with red tape this isn't great at all.
I had faced the same issue while updating Visual Studio 2017 and 2019. I tried to open the Visual Studio Installer directly as admin and then it worked as expecred.
Update kept failing when using the "Check for Updates" menu item in the VS2019 IDE. When I ran the Visual Studio Installer from the Windows Start bar it immediately prompted to download the latest version of the installer. Once that was done it then offered to update VS2019.

How to fix the error "Windows SDK version 8.1" was not found?

I recently updated visual studio 2015 and now, when i try to build any project it always fails and i get the error
Severity Code Description Project File Line Suppression State
Error MSB8036 The Windows SDK version 8.1 was not found. Install the required version of Windows SDK or change the SDK version in the
project property pages or by right-clicking the solution and selecting
"Retarget solution". Proj D:\Program Files (x86)\visual studio
2017\Common7\IDE\VC\VCTargets\Platforms\Win32\PlatformToolsets\v141\Toolset.targets 34
I retargeted the solution as it said, and the problem persisted, even though the retargetting was completed.I decided to install visual studio 2017 because of this, and, lo and behold, it did the exact same thing.I'm also using windows 7.
What is the problem and how can i fix it?
I faced this problem too. Re-ran the Visual Studio 2017 Installer, go to 'Individual Components' and select Windows 8.1 SDK. Go back to to the project > Right click and Re-target to match the SDK required as shown below:
I installed the 8.1 SDK's version:
https://developer.microsoft.com/en-us/windows/downloads/sdk-archive
It used 1GB (a little more) in the installation.
Update October, 9 (2020). There's a https error: the sdksetup link is https://go.microsoft.com/fwlink/p/?LinkId=323507
"Save link as" should help.
Another way (worked for 2015) is open "Install/remove programs" (Apps & features), find Visual Studio, select Modify. In opened window, press Modify, check
Languages -> Visual C++ -> Common tools for Visual C++
Windows and web development -> Tools for universal windows apps -> Tools (1.4.1)
and Windows 10 SDK ([version])
Windows and web development -> Tools for universal windows apps -> Windows 10 SDK ([version])
and install. Then right click on solution -> Re-target and it will compile
I had win10 SDK and I only had to do retarget and then I stopped getting this error. The idea was that the project needs to upgrade its target Windows SDK.
I realize this post is a few years old, but I just wanted to extend this to anyone still struggling through this issue.
The company I work for still uses VS2015 so in turn I still use VS2015. I recently started working on a RPC application using C++ and found the need to download the Win32 Templates. Like many others I was having this "SDK 8.1 was not found" issue. i took the following corrective actions with no luck.
I found the SDK through Micrsoft at the following link
https://developer.microsoft.com/en-us/windows/downloads/sdk-archive/ as referenced
above and downloaded it.
I located my VS2015 install in Apps & Features and ran the repair.
I completely uninstalled my VS2015 and reinstalled it.
I attempted to manually point my console app "Executable" and "Include" directories to the C:\Program Files (x86)\Microsoft SDKs\Windows Kits\8.1 and C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools.
None of the attempts above corrected the issue for me...
I then found this article on social MSDN https://social.msdn.microsoft.com/Forums/office/en-US/5287c51b-46d0-4a79-baad-ddde36af4885/visual-studio-cant-find-windows-81-sdk-when-trying-to-build-vs2015?forum=visualstudiogeneral
Finally what resolved the issue for me was:
Uninstalling and reinstalling VS2015.
Locating my installed "Windows Software Development Kit for Windows 8.1" and running the repair.
Checked my "C:\Program Files (x86)\Microsoft SDKs\Windows Kits\8.1" to verify the "DesignTime" folder was in fact there.
Opened VS created a Win32 Console application and comiled with no errors or issues
I hope this saves anyone else from almost 3 full days of frustration and loss of productivity.
Grep the folder tree's *.vcxproj files. Replace <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion> with <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion> or whatever SDK version you get when you update one of the projects.
For me in the Project Properties Settings General->Target Platform -> Change Windows 8.1 to Windows 10 solved the issue
Install the required version of Windows SDK or change the SDK version
in the project property pages
or
by right-clicking the solution and selecting "Retarget solution"
If you do visual studio guide, you will resolve the problem.
I encountered this issue while trying to build an npm project. It was failing to install a node-sass package and this was the error it was printing. I solved it by setting my npm proxy correctly so that it could reach the npm repo
PROBLEM: I ONLY get this compile-time "Windows SDK version 8.1 not found" error ( and a few other very-hard-to-resolve-nuisance errors -- cannot list them all ) when I export a project from an old version of MS Visual Studio (VS) to the new MS VS (2017), using the new MS VS export/"One-way Upgrade" feature.
SOLUTION: I have since learned to not use this export/upgrade feature and instead just create the new project from scratch -- using all my old source files, of course. Only my project settings have to be rebuilt, to be clear.
This is a bit of a pain, and a shame the export/upgrade feature won't work properly like it used to, but this is is actually easier and faster in the long run. MUCH better than working through a list of spurious errors that really should not have arisen in the first place.
Hope this helps...

Cannot create C++ projects in VS 2013 community

After I chose "Win32 Console Application" or "Win32 Project" and went through the wizard, I got an empty solution. And the "New Project" dialog poped up again:
When I tried the project types under the CLR category, I got an error:
It says something about accessing the OLE system registry.
But Windows Store C++ Application projects and other languages work just fine.
I've tried to:
Use the repair function provided by the installer.
Run vs_community.exe /uninstall /force and reinstall it.
Delete the ProjectTemplatesCache and ItemTemplatesCache directory in C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE and run devenv to install them again.
Run as Administrator and turn off security softwares.
I would have put this in comments but apparently you need more reputation points to comment than you do for an answer.
I recently had an OLE system registry error, mine occurred in a different way but it was tied to windows updates. It fixed itself when I uninstalled VS, installed updates, restarted computer, and re-installed VS(if you are installing from an exe and not a disc make sure you re-download the exe).
That solve the problem for me.