Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
Unlike other path selection settings in Visual Studio, "Tools > Options > Xamarin > Android Settings > Android SDK Location" is not an editable text field
## Example steps to get a feel for the problem
1. Start with a Windows system that has 2 identical copies of the Android SDK installed at 2 different locations. For my tests, I used the following 2 locations:
- C:\Program Files (x86)\Android\android-sdk
- C:\Android SDK\android-sdk
2. Create symbolic directory links to the 2 locations. For example, I used the following 2 commands in a cmd.exe command prompt:
mklink /D C:\android-sdk-1 "C:\Program Files (x86)\Android\android-sdk"
mklink /D C:\android-sdk-2 "C:\Android SDK\android-sdk"
3. Navigate to "Tools > Options > Xamarin > Android Settings > Android SDK Location > Change" in Visual Studio.
4. Select either "C:\android-sdk-1" or "C:\android-sdk-2" in the dialog.
## Result 1 (not a problem): The Windows file browser dialog automatically resolves the symlink paths
The "Android SDK Location" UI label gets updated to show the _resolved target path_ rather than the symlink path.
For example, when I select "C:\android-sdk-1" at step 4, the settings page updates to show:
> C:\Program Files (x86)\Android\android-sdk
And if I select "C:\android-sdk-2" at step 4, the settings page updates to show:
> C:\Android SDK\android-sdk
(As expected based on these UI results, the registry values that get saved under the "AndroidSdkDirectory" registry key are also the target paths rather than the symlink paths.)
This symlink resolution is _not_ the problem. The Windows OS file browsing dialogs themselves are responsible for this behavior, so getting back a resolved target path is the _correct_ result when using these dialogs.
## Result 2 (problematic): The "Android SDK Location" UI field is not an editable text field
The problem is that the "Android SDK Location" UI field is different compared to other Visual Studio path selection settings because it is just printed text rather than an _editable_ text field. This means that there is no way for the user to edit the selected path to "C:\android-sdk-1" if they really want to (other than editing the registry key in regedit).
Here are 5 examples of settings under "Tools > Options" where the graphical file browser dialog resolves the symlinks but where the path is also editable as a _text field_ so that users could enter a non-resolved symlink path by hand if they wanted to:
- "IntelliTrace > Advanced > Store IntelliTrace recordings in this directory"
- "Web Performance Test Tools > Test Execution > Web application root directory"
- "NuGet Package Manager > Package Sources > Source"
- "Projects and Solutions > Locations" (all 3 location settings)
- "Environment > Import and Export Settings > Automatically save my settings to this file"
## Testing environment info (brief)
XamarinVS 126.96.36.199 (60c3d0e)
Microsoft Visual Studio Enterprise 2017 Preview (Pre)
Version 15.3.0 Preview 3.0
Microsoft .NET Framework
Windows 10 Version 1703 (OS Build 15063.413)
US English locale, US Eastern time zone
Logged in with a local user named "Windows User"
## Possible workaround
Create a directory junction rather than a directory symbolic link. For example, the file browser allowed me to select "C:\android-sdk-3" _without_ any automatic resolving to the target path when I used a directory junction:
mklink /J C:\android-sdk-3 "C:\Program Files (x86)\Android\android-sdk"
*** Bug 58003 has been marked as a duplicate of this bug. ***
Fixed in version 188.8.131.528 (d15-4)
Pull Request #7950 merged by: Jose Gallardo
Commit: 6b2763b3ed7789dc9403a69b7d828140bd43808f (xamarin/XamarinVS)
I have verified the fix on following build.
Microsoft Visual Studio Enterprise 2017
Microsoft .NET Framework
Installed Version: Enterprise
Xamarin 184.108.40.2066 (6b2763b3e)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.
Xamarin.Android SDK 220.127.116.11 (0cd0214)
Xamarin.Android Reference Assemblies and MSBuild support.
Xamarin.iOS and Xamarin.Mac SDK 10.12.0.14 (bf350ba)
Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.
The SDK path are editable now http://i.imgur.com/a7x99F8.png