error: Microsoft Visual C++ 14.0 or greater is required - visual-studio

While installing python package I get the following error even though I have latest Microsoft Visual Studio BuildTools installed.
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
I have added all possible paths to Path variables as well
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Microsoft\VisualStudio\v16.0\Python Tools
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools
C:\Program Files (x86)\MSBuild\14.0\Bin
C:\Program Files (x86)\MSBuild

Installing fulll vs_BuildTools solved it for me . For details follow
https://www.scivision.dev/python-windows-visual-c-14-required
Note MSVC vXXX - VS YYYY C++ x64/x86 build tools version and Windows 10 SDK versions must match
Quick solutions like instaling vc_redist.x64 or VC_redist.x86 didn't
solve it for me.
Nothing needs to be added to environment variables.

Answer
If your vscode is supported in 32 bit version, it raises when you start install some packages. I recommended you to install 64 bit vscode if you are using windows 10.

Related

Visual Studio 2022: Cannot open include file: 'ctype.h'

I've got the infamous error message in C++ build: "Cannot open include file: 'ctype.h'". I know a similar question was already asked multiple times, but my case seems different because I am using the latest Visual Studio 2022 and seems to behave differently.
I have a bunch of existing C++ projects, they use plain 32-bit Windows API with DirectX 6, and I used VC++ build tools 2015 and Windows SDK 8.1 to compile it without any issues in previous versions of Visual Studio. Everything was fine in Visual Studio 2019, no special setup was needed, until I uninstalled it and installed Visual Studio 2022.
Now I can open my solutions, it nicely shows they are using C++ build tools 2015, which I installed together with VS2022, and the solutions also shows correctly that they use Windows 8.1 SDK. But Windows 8.1 SDK is not present in VS2022 installation, I installed it separately. I also tried to "repair" VS2022 installation, but that only deleted all my UI preferences, but not fixed anything in build. Also, I tried to reinstall Windows 8.1 SDK, but it said it is already OK.
When looking to Visual Studio, I can't see any place where I can set default include and lib directories, I can only list what is being used right now. VS2022 shows this list:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\atlmfc\include
C:\Program Files\Windows Kits\10\Include\10.0.10240.0\ucrt
C:\Program Files (x86)\Windows Kits\8.1\Include\um
C:\Program Files (x86)\Windows Kits\8.1\Include\shared
C:\Program Files (x86)\Windows Kits\8.1\Include\winrt
The actual error message I receive is this:
c:\program files (x86)\windows kits\8.1\include\um\winnt.h(31): fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory
So it says that winnt.h from windows kits 8.1 cannot find ctype.h. And yes, there is no ctype.h in that folder or anywhere around, I can see it only in C:\Program Files\Microsoft Visual Studio\2022\Professional\SDK\ScopeCppSDK\vc15\SDK\include\ucrt
which I think is the folder with VC++ 2015 build tools. So this seems correct, but I am wondering why this folder is not a part of default include directories when VC++ 2015 build tools are set in project settings. Because it seems that VS2022 is correctly picking my Windows 8.1 SDK, but not picking correctly the older C++ compiler.
When I try to add the folder where ctype.h resides to include folders, I receive another type of errors saying that other files are incompatible with these include files. Of course, this system of directories needs to be in sync. So please what is the correct way of using this?
Also, I tried to switch the VC++ build tools to 2022 version. Unfortunately, that also does not fix the issue. And Windows 10 SDK is not installed, the software wants to stay compatible with older Windows, so I don't need it.
I found a bug report which is related: https://developercommunity.visualstudio.com/t/windows-81-sdk-1/151682
Although Microsoft staff declined to accept it as a bug, it is happening for me as well. When I install only Windows 8.1 SDK, no project can be compiled with it. I even tried to create a new Windows API project in VS2022, the project was created, but failed to compile with the same error.
So I tried to install Windows 10 SDK (from VS2022 installed, but that is probably not important) and this added some missing files which now help to compile Windows 8.1 SDK projects. Problem seems to be solved, my old C++ code can now be compiled with Windows 8.1 SDK and both C++ build tools 2015 and 2022.

Python is missing after installing via Visual Studio 2019

I've installed VS2019 (Enterprise) and marked Python 3 in the individual components tab:
According to this page it should reside in:
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\Extensions\Microsoft\Python but actually there is no Python dir under Microsoft dir.
I was able to find the python path under: C:\Program Files (x86)\Microsoft Visual Studio\Shared
I've also opened an issue against the documentation page so it will be updated there as well

Where Can I Download Microsoft.Phone.WinJS.2.1?

I'm trying to make a universal Windows App with WinJS. I've downloaded the latest update to VS2013. The RC version. I've installed all the SDKs I can find. I've installed the WinLibJS_VSE.exe extension, as well. Funny thing about that one is that VS updates keeps saying that I didn't...
When I open up any of the sample universal WinJS apps - like the ones here http://code.msdn.microsoft.com/wpapps/Universal-Windows-app-cb3248c3 - I always end up with this error:
Could not find SDK "Microsoft.Phone.WinJS.2.1, Version=1.0". C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets
I tried finding this SDK on my machine, but I'm not finding it at all. Nor am I finding it online. I copied some SDKs from C:\Program Files (x86) into C:\Program Files (x86)\Microsoft SDKs to no avail.
Any ideas?
The Windows Phone SDK should have been installed when you installed the Visual Studio 2013 Ultimate Update 2 RC.
The files should be located here:
C:\Program Files (x86)\Microsoft SDKs\WindowsPhoneApp\v8.1\ExtensionSDKs\Microsoft.Phone.WinJS.2.1\1.0\DesignTime\CommonConfiguration\Neutral\Microsoft.Phone.WinJS.2.1\js
When you create a C# project, is it a Silverlight project or a Windows Runtime project?
Okay, I've been talking to the Visual Studio team about this.
Did you happen to install the "Visual Studio 2013 Extensions for the Windows Library for JavaScript"?
http://www.microsoft.com/en-us/download/details.aspx?id=40793
(In the Programs and Features list, it will appear as "Visual Studio Extension for Windows Library for JavaScript".)
If so, you'll need to uninstall it. The order for uninstall is:
Visual Studio 2013
Visual Studio Update 2 RC
"Visual Studio Extension for the Windows Library for JavaScript"
After the uninstall, reinstall in this order:
Visual Studio 2013
Visual Studio Update 2 RC
Of course, all of this assumes that you've already upgraded your development environment to Windows 8.1. These projects will only work on a Windows 8.1 machine.
I hope that this helps. If not, we can try something else.
The final release of Visual Studio seems to have resolved this issue.
http://www.visualstudio.com/en-us/downloads/download-visual-studio-vs
I had the same problem and I tried all above none of them work. However the following worked for me:
1-) Uninstall Visual Studio extensions for Javascript
2-) Uninstall visual studio 2013
3-) Install visual studio 2013 with Update 2 RC from the following link (it is VS + update 2 bundled)
http://www.microsoft.com/en-us/download/confirmation.aspx?id=42303
Above link is for Premium edition. Find the relevant link accoringly.
P.S It is quite lame that when you uninstall Visual studio , it doesn't uninstall some of its addins. And you have lot of remaining artifacts :(
Andy (and potentially others running into this issue)....
We are currently investigating into this issue to understand the root cause. If this issue is blocking you from development, the recommendation is to perform the following steps "carefully". If these steps do not help, then please let us know!
Uninstall Visual Studio 2013 from Programs and Features
Reboot machine if prompted
Delete or rename these folders-
I. \Documents\Visual Studio 2013
II. C:\Program Files (x86)\Microsoft Visual Studio 12.0
III. C:\Program Files\Microsoft Visual Studio 12.0
IV. \AppData\Roaming\Microsoft\VisualStudio\12.0
V. \AppData\Local\Microsoft\VisualStudio\12.0
VI. C:\Program Files (x86)\Microsoft Visual Studio 12.0
VII. C:\Program Files (x86)\Microsoft XDE\8.1
VIII. C:\Program Files (x86)\Microsoft SDKs\Windows Phone\
IX. C:\Program Files (x86)\Microsoft SDKs\WindowsPhoneAppx\
X. C:\Program Files (x86)\Windows Phone Silverlight Kits
XI. C:\Program Files (x86)\Windows Phone Kits
XII. C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\WindowsPhone
XIII. C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\WindowsPhoneAppx
XIV. C:\Program Files (x86)\Common Files\Microsoft Shared\Phone Tools
Go to the registry editor (start >> run >> regedit) and remove/rename the following registries-
I. HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\12.0
II. HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\12.0
III. HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0
IV. HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0_Config
Download the .iso image of Visual Studio 2013 preferably using the relevant MSDN account
Extract the .iso file by using an extraction tool, such as WinRar (http://www.rarlab.com/rar/winrar-x64-401.exe) remember to associate .iso extension with WinRar during its setup
Install Visual Studio 2013 using this extracted setup
Install the Visual Studio Update 2 RC from here: _http://www.microsoft.com/en-us/download/details.aspx?id=42307
Check if the templates are appearing
You can then install the Windows Phone standalone SDK from here: _https://dev.windowsphone.com/en-us/downloadsdk or through the Visual Studio extensions.

Task could not find "AL.exe" using the SdkToolsPath

I have this problem tring to build one solution
Task could not find "AL.exe" using the SdkToolsPath "C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools\" or the registry key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A". Make sure the SdkToolsPath is set and the tool exists in the correct processor specific location under the SdkToolsPath and that the Microsoft Windows SDK is installed
I know there is a similar question, but the aswer didn't work for me
In the same computer a can build other solutions in Net 4 without any problem, so don't understand
I'm using:
Windows XP Professional SP3
Visual Web Developer 2010 Express
Easiest thing to do is copy al.exe
from
C:\Program Files\Microsoft SDKs\Windows\v7.1\bin\NETFX 4.0 Tools\
(For Windows 10 from
C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6 Tools)
to
C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools\
As I got this issue in VS2019 after a fresh install of both Windows and Visual Studio 2019 I thought it might be good to share:
Installing Microsoft.Net.Component.4.7.2.SDK from the Visual Studio installer fixed it for me!
Do you have any resource files in your project? Try to delete all of them and build your project again.
I've got exact the same error and after deleting the resource files (*.hrsx) my build worked again.
Maybe it helps.
I am using VS2019, this way works for me:
Add a system env variable TargetFrameworkSDKToolsDirectory
like this:
TargetFrameworkSDKToolsDirectory=C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.2 Tools

signtool.exe not found in vs2008

I'm trying to publish a program in vs2008 but I get the following error,
can not publish because a project failed to build.
An error occurred while signing: signtool.exe not found.
I've been searching Google for some time now but I can't find the answer.
I can't find signtool.exe; can anyone tell me where I can get it?
signtool.exe is included with the Windows SDK, and a copy of the Windows SDK is included with VS2008.
It should be installed as %ProgramFiles%\Microsoft SDKs\Windows\v6.0A\bin\signtool.exe, but it might depend on installation options.
Another route is to install the Windows SDK directly (latest version includes Win7/2008R2 support).
VS 2008 - This tool is located at,
C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin
Probably you could find in any one of this location.
C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin
C:\Program Files\Microsoft Visual Studio 8\Common7\Tools\Bin
C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin

Resources