TADP 4.0r1 multiple target architecture error

Tried to build several targets and got this error:

1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\Tegra-Common\Nvidia.Build.targets(72,5): error : Cannot use toolchain from d:\development\android\ndk: The given key was not present in the dictionary.

it seems that your installation is not successful. Could you try clean install?

victor

Well, not now, I don’t need it really. But new TADP was installed over old, used external SDK/NDK, and the project was upgrded from previous version of TA.

Hi,
I get the same error as ChronicRat:
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\Tegra-Common\Nvidia.Build.targets(72,5): error : Cannot use toolchain from C:\NVPACK\android-ndk-r10d: The given key was not present in the dictionary.

I’ve tried reinstalled the TADP package, but did not make any difference.
I only get it when trying to build Multiple arch build (Tegra-Android), building the ARM-Android-NVIDIA & x86-Android-NVIDIA individually works fine. So my current workaround is the build the individual builds in succession
Using Multiple arch with ‘Platforms to package’ as only ARM (as opposed to ARM;x86) also made no difference.

Here is a link to a verbose log from MSBuild when trying to build a single cpp file of one of the static libraries we’re building (our solution consists of four static libraries (.a) and one application).
http://pastebin.com/RV3ymvjz

// Tobias

Hi Tobias,

Thanks for the detailed report - we’ve found the issue and fixed it. The fix will be available in the upcoming Nsight Tegra release.

To work around the issue, you can edit the project file manually and remove the multiple property setting from every platform’s property group except the Tegra-Android one.

Hey Dmitry,

I started to get this error after installing 4.0r2 TADP. Before that I used 3.0r4. The messagebox with the error “The given key was not present in the dictionary.” pops up when I try to debug Android app in VS2013 (I press F5, it builds everything successfully and it fails with this error trying to open the deployment/starting debugger notification window). I am on Win7 x64. The log in NVidia Tegra/Logs doesn’t contain anything interesting:

2015-06-10 20:26:14.9915|INFO|Nvidia.PentaK.Utilities.RedirProcess|1-launch: C:\NVPACK\android-sdk-windows\platform-tools\adb.exe “version”
2015-06-10 20:26:15.0125|INFO|Nvidia.PentaK.Utilities.RedirProcess|1-stdout:
Android Debug Bridge version 1.0.32

2015-06-10 20:26:15.0125|INFO|Nvidia.PentaK.Utilities.RedirProcess|1-stderr:

2015-06-10 20:26:15.0125|INFO|Nvidia.PentaK.Utilities.RedirProcess|1-exited: code 0, finished in 16 ms
2015-06-10 20:26:15.0125|INFO|Nvidia.PentaK.Utilities.RedirProcess|2-launch: C:\NVPACK\android-sdk-windows\platform-tools\adb.exe “start-server”
2015-06-10 20:26:15.0325|INFO|Nvidia.PentaK.Utilities.RedirProcess|2-stdout:

2015-06-10 20:26:15.0325|INFO|Nvidia.PentaK.Utilities.RedirProcess|2-stderr:

2015-06-10 20:26:15.0325|INFO|Nvidia.PentaK.Utilities.RedirProcess|2-exited: code 0, finished in 15 ms
2015-06-10 20:26:15.0405|INFO|Nvidia.PentaK.Target.Android.Tools.AdbClient|[ADB] Received response OKAY
2015-06-10 20:26:15.0405|INFO|Nvidia.PentaK.Target.Android.Tools.AdbClient|[ADB] Connected to adb server
2015-06-10 20:26:15.0405|INFO|Nvidia.PentaK.Target.Android.Tools.AdbClient|[ADB] Received response 0000
2015-06-10 20:26:36.8975|INFO|Nvidia.PentaK.Utilities.RedirProcess|3-launch: C:\NVPACK\android-sdk-windows\platform-tools\adb.exe “version”
2015-06-10 20:26:36.9155|INFO|Nvidia.PentaK.Utilities.RedirProcess|3-stdout:
Android Debug Bridge version 1.0.32

Any idea how to figure out what’s wrong? I tried to uninstall and re-install TADP but w/o any success.

Hi Artyom,

Which Nsight Tegra version are you using? This behavior could be due to the serious installation issue which I think we’ve fixed only in AndroidWorks (Nsight Tegra 3.0).

Yep, I’ve installed the Android Works 1R1 and yes, the Tegra is 3.0.15156.7946. Happens on all 3 Visual Studios installed on my PC (2010, 2012, 2013).

Are there any logs or additional info I can provide to help to resolve the issue? It is a real showstopper for me right now… :(

Hmm, we’ve just encountered the same behavior locally. We’re currently working on fixing that and chances are it will fix your issue as well. Stay tuned!

We’ve found that in our case the projects in question did not have the correct elements order in the vcxproj file. At the moment we’re researching the possibilities of automatic order correction. Meanwhile, you could try reordering the file manually using this article as a guide: http://blogs.msdn.com/b/visualstudio/archive/2010/05/14/a-guide-to-vcxproj-and-props-file-structure.aspx

We also got the error “The given key was not present in the dictionary.” when hitting F5, but I fixed it locally by manually reordering two elements in the vcxproj file.

For UE4, I moved the of “Microsoft.Cpp.Default.props” to the beginning, between “Globals” and the list of “Configurations”. I also moved the with all source files to the end, between and the of “Microsoft.Cpp.targets”.

Thanks, Niklas!

I have the same problem. It come from external android ndk. Seem that Nsight just support android-ndk-9x only. It didn’t support android-ndk-8x/10x.

Please, upgrade to the latest version of Android Works - it works well with android-ndk-r10d/e.
If your problem persist, please attach the logs from %AppData%\NVIDIA Corporation\Nsight Tegra\Logs

I am still getting this error “The given key is not in dictionary” even using the latest AndroidWorks 1R2. The Semdis’ workaround works, but it is quite annoying (considering that I have to re-generate project files periodically).

Are you using Unreal Engine 4? If so, it’s a problem with UE4’s .vcxproj generation code. I modified modified the Engine/Source/Programs/UnrealBuildTool/System/VCProject.cs file so it generates the elements in the correct order:

http://pastebin.com/XtkCCh4F

Hi, I use the latest AndroidWorks 1R4 with VS2010 (Windows10). When I connect Android device and click on Debugging I get the same “The given key is not in dictionary” error. I have checked MyProjectName.vcxproj file and it looks to comply with structure, described here:

https://blogs.msdn.microsoft.com/visualstudio/2010/05/14/a-guide-to-vcxproj-and-props-file-structure/

(the only difference is that I have extra <PropertyGroup Condition after

<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />

line)

How can I fix this problem?

Hi Nikolay:
The error comes from the corrupt status of VS plugin.
Devenv /UpdateConfiguration
Devenv /ClearCache

Victor

Victor, just tried to run “devenv /updateconfiguration” but got the following “Invalid command line” error message:

C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE>devenv /updateco
nfiguration

Microsoft (R) Visual Studio Version 10.0.40219.1.
Copyright (C) Microsoft Corp. All rights reserved.

The evaluation period for Visual Studio Trial ends in 16 days.

Invalid Command Line. Unknown Switch : updateconfiguration.

Use:
devenv  [solutionfile | projectfile | anyfile.ext]  [switches]

Could you please specify the full command string or tell me why I have this problem…