How to find Android sdkmanager installed path in Windows with Visual Studio 2017 - xamarin

We are using Visual Studio 2017 (15.7.4 update) with Windows OS. We are facing issue on Android SDK manager installed path. Can you please suggest idea to get Android SDK manager installed path based on registry or command line?
Regards,
Dheepa

It should be in: C:\Program Files (x86)\Android unless you set a particular path. You won't have any key on the registry since it a folder from which VS (or any other IDE) "uses" the Android SDK. You can give it a try checking in your Environment Variables if there is any path referring to the Android SDK, otherwise simply redownload the zip.

To work with Android Visual Studio installs openJDK in
C:\Program Files\Android\jdk
and Android SDK at
C:\Program Files (x86)\Android\android-sdk
You can find sdkmanager.bat at
C:\Program Files (x86)\Android\android-sdk\tools\bin
It is recommended to add the bin directory to the system path.

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.

"Windows Kits\10\Redist\ucrt\DLLs" doesn't exist

I am trying to build a WebRTC library. It has a bunch of build python scripts one of which is trying to access
C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x64
And copy ucrt Dlls into build directory.It fails there because my Redist directory doesn't have ucrt folder. I tried to uninstall my Windows SDK 10 and reinstall it.But Redist is still empty. Based on this doc by Microsoft:
To obtain the binaries for app-local deployment, install the Windows
Software Development Kit (SDK) for Windows 10. The binaries will be
installed to C:\Program Files (x86)\Windows Kits\10\Redist\ucrt.
But it simply doesn't happen.I also tried to reinstall all the Windows tools and SDK via my VS2015 (Community) installer.
Did Microsoft deprecate the redistributable part of the installation?
How can I solve this?
I installed Windows SDK 10.0.16299.0 . My system is Windows 10 64bit.
It happened to me. Both the visual studio installer and the standalone install incomplete/corrupt versions of the sdk.
Solution: Install the sdk in a windows VM (you can use the Microsoft provided vm: https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/) and install the SDK there, then copy the complete folder (named 10 in my case) to the appropriate route. In Windows 10 would be: *C:\Program Files (x86)\Windows Kits*
(Commenting 4 year later because I came here looking for the same answer :) )

Task could not find "AL.exe" TFS 2013

I'm using Windows 7 SP1 and Visual studio Ultimate 2013. TFS server 2013 is installed in Windows Server 2008.
Below error occurred while trying to build one solution which supports multilingual resx files:
C:\Program Files
(x86)\MSBuild\12.0\bin\amd64\Microsoft.Common.CurrentVersion.targets
(3001): Task could not find "AL.exe" using the SdkToolsPath "" or the
registry key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft
SDKs\Windows\v8.1A\WinSDK-NetFx40Tools-x86". 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 have gone through similar questions, but those solutions didn't work. Few are given below:
Install Windows SDK
Windows SDK is already installed
al.exe is present in C:\Program Files\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools
al.exe is present in \Windows\v7.0A\bin and v8.0A\bin\NETFX 4.0 Tools
Remove resx files and build
Resx files are part of the project and I want them to be in my build.
Any idea to fix this issue?
Thanks for your comments. I installed Windows SDK in server machine, where TFS is installed. It solved my problem.

Cannot create Multi-Device Hybrid App project

I've installed the Multi-Device Hybrid Apps for Visual Studio 2013 CTP 2.0, however I can not create a project, as I get the following message:
This project cannot be created because Node.js could not be found.
I already had Node.js installed under C:\Program Files (x86)\nodejs\node.exe before I installed this extension.
Where can I set the path so that this extensions finds Node.js? I cannot see anything under Tools -> Options -> Multi-Device Hybrid Apps.
EDIT:
C:\Program Files (x86)\nodejs is in my System Path variable.
I'm running Visual Studio 2013 as Administrator.
Fixed. The solution to this problem was to un-install Nodejs, then re-run the Multi-Device Hybrid Apps extension installation.
Wayne,
Could you check if your node install folder is in your system Path? If not, please add C:\Program Files (x86)\nodejs\ to the path and try creating your project again.
We add the node folder to your path when you install node through our installer. Since you already had node installed, did you uncheck the "Joyent Node.js" option while installing our tools? This might have led to the folder not being added to the path.
Let us know if that unblocks you.
EDIT
A couple more things
In the registry HKCU\Software\Node.js, there should be a registry value "InstallPath". Could you check if that value exists and points to an existing folder on disk and that the folder contains Node.exe?
Does the nodejs folder under program files contain the node.exe file?
Thanks!
-Avani

pvk2pfx.exe - can not find

Could tell me where to find the file pvk2pfx.exe?
It is supposed to be located in <programfile>/Visual Studio 8/Common7/Tools/bin/pvk2pfx.exe, but not on my machine.
I don't seem to be able to find it online either. I tried installing the SDK, but it didn't work.
Have you checked the SDK path? The SDK path on my machine where pvk2pfx.exe is located is C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin>
pvk2pfx.exe is not related to Microsoft .NET (2.0) SDK but to C/C++ SDK so look fo in c:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\ directory.
You need to install Windows SDK https://developer.microsoft.com/pl-pl/windows/downloads/windows-sdk/ . When installing please have selected "Windows SDK for Desktop C++ x86 apps" option.
Then the pvk2pfx.exe file will be located in C:\Program Files (x86)\Windows Kits\10\bin\10.0.22000.0\x86 .
You can also run the "Developer Powershell for VS 2022" (or the latest equivalent) and it will already know where to look.

Resources