Bug 58003 - Cannot change android sdk path in VS 2017
Summary: Cannot change android sdk path in VS 2017
Status: RESOLVED DUPLICATE of bug 58066
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: Android ()
Version: unspecified
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-07-07 13:13 UTC by gcnew
Modified: 2017-07-11 01:43 UTC (History)
5 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and 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 Links.

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.

Related Links:
Status:
RESOLVED DUPLICATE of bug 58066

Description gcnew 2017-07-07 13:13:11 UTC
Reproduce:
1. Open VS 2017->Tools->Options->Xamarin->Android Settings-> 
2. press Change button corresponding to SDK location and change path using file picker
Expected result:
SDK path changed as was picked with file piker.
Received result:
Sdk path is still as it was despite my actions.
Comment 1 Kent Green [MSFT] 2017-07-07 22:14:19 UTC
## Test results
I've tested this issue and I am not able to reproduce it in Visual Studio 2017. To test it I did the following:

1. I created a copy of the Android SDK folder so that I would have a valid result to point to:
> C:\Program Files (x86)\Android\android-sdk - Copy

2. Per the description, I pointed the Android SDK path to the "android-sdk - Copy" path which was a valid location for the Android SDK; and it worked.


## Build Information
Microsoft Visual Studio Enterprise 2017  (2)
Version 15.2 (26430.15) Release
VisualStudio.15.Release/15.2.0+26430.15
Microsoft .NET Framework
Version 4.6.01586

Installed Version: Enterprise

Visual Basic 2017   00369-60000-00001-AA026
Microsoft Visual Basic 2017

Visual C# 2017   00369-60000-00001-AA026
Microsoft Visual C# 2017

Visual C++ 2017   00369-60000-00001-AA026
Microsoft Visual C++ 2017

Visual F# 4.1   00369-60000-00001-AA026
Microsoft Visual F# 4.1

Application Insights Tools for Visual Studio Package   8.6.00404.2
Application Insights Tools for Visual Studio

ASP.NET and Web Tools 2017   15.0.30503.0
ASP.NET and Web Tools 2017

ASP.NET Web Frameworks and Tools 2017   5.2.50303.0
For additional information, visit https://www.asp.net/

Azure App Service Tools v3.0.0   15.0.30209.0
Azure App Service Tools v3.0.0

Azure Data Lake Node   1.0
This package contains the Data Lake integration nodes for Server Explorer.

Azure Data Lake Tools for Visual Studio   2.2.5000.0
Microsoft Azure Data Lake Tools for Visual Studio

Common Azure Tools   1.9
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

Fabric.DiagnosticEvents   1.0
Fabric Diagnostic Events

JavaScript Language Service   2.0
JavaScript Language Service

JavaScript Project System   2.0
JavaScript Project System

JavaScript UWP Project System   2.0
JavaScript UWP Project System

KofePackagePackage Extension   1.0
KofePackagePackage Visual Studio Extension Detailed Info

Merq   1.1.17-rc (cba4571)
Command Bus, Event Stream and Async Manager for Visual Studio extensions.

Microsoft Azure Hive Query Language Service   2.2.5000.0
Language service for Hive query

Microsoft Azure Tools   2.9
Microsoft Azure Tools for Microsoft Visual Studio 2017 - v2.9.50131.1

Microsoft MI-Based Debugger   1.0
Provides support for connecting Visual Studio to MI compatible debuggers

Microsoft Visual Studio VC Package   1.0
Microsoft Visual Studio VC Package

Mono Debugging for Visual Studio   Mono.Debugging.VisualStudio
Support for debugging Mono processes with Visual Studio.

NuGet Package Manager   4.2.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

SQL Server Data Tools   15.1.61702.140
Microsoft SQL Server Data Tools

ToolWindowHostedEditor   1.0
Hosting json editor into a tool window

TypeScript   2.2.2.0
TypeScript tools for Visual Studio

Visual Studio Tools for Universal Windows Apps   15.0.26430.06
The Visual Studio Tools for Universal Windows apps allow you to build a single universal app experience that can reach every device running Windows 10: phone, tablet, PC, and more. It includes the Microsoft Windows 10 Software Development Kit.

Xamarin   4.5.0.486 (fec6f88)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android SDK   7.3.1.2 (9dbc4c5)
Xamarin.Android Reference Assemblies and MSBuild support.

Xamarin.iOS and Xamarin.Mac SDK   10.10.0.37 (ad35de4)
Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.

## Additional Observations
One interesting thing I found is that in Visual Studio for Mac on the Beta channel, I am seeing very similar symptoms as this bug. Specifically when I try to change the default SDK location in VS for Mac, it seems to switch, but the new path is not saved. 

## Questions
Can you send over your full version information when you reproduce the issue, as well as the exact error message displayed when you try to change the SDK path.
Comment 2 gcnew 2017-07-10 05:22:43 UTC
VS Enterprise 2017 Version 15.2 (26430.15) Release.
I have no idea where I can find xamarin version. I use one which comes with VS. dll-s are dated to June 29, 2017.
There is no error message. I just open dialog and it always says that android sdk is here: C:\Program Files (x86)\Android\android-sdk. Even though I created link in root folder C:\android-sdk and changed path to sdk in registry (HKEY_CURRENT_USER\Software\Xamarin\VisualStudio\15.0_8c9df351\Android).
When I change path through this dialog whatever I choose (C:\android-sdk for example) it remains as it was and spoils path in registry.
I did clean install of OS (win 10 1703) and installed software on my PC 2 weeks ago and didn't have any updates or any other special tricks.
Comment 3 gcnew 2017-07-10 05:28:20 UTC
I have clean install of Windows 10 Enterprise x64 1703 creators update from msdn subscription which became available not long ago. All updates are installed.
Comment 4 gcnew 2017-07-10 05:31:17 UTC
My VS info:

Microsoft Visual Studio Enterprise 2017 
Version 15.2 (26430.15) Release
VisualStudio.15.Release/15.2.0+26430.15
Microsoft .NET Framework
Version 4.7.02046

Installed Version: Enterprise

Visual Basic 2017   00369-60000-00001-AA024
Microsoft Visual Basic 2017

Visual C# 2017   00369-60000-00001-AA024
Microsoft Visual C# 2017

Visual C++ 2017   00369-60000-00001-AA024
Microsoft Visual C++ 2017

Visual F# 4.1   00369-60000-00001-AA024
Microsoft Visual F# 4.1

Add New File   3.5
The fastest and easiest way to add new files to any project - including files that start with a dot

ASP.NET and Web Tools 2017   15.0.30503.0
ASP.NET and Web Tools 2017

ASP.NET Core Razor Language Services   1.0
Provides languages services for ASP.NET Core Razor.

ASP.NET Web Frameworks and Tools 2017   5.2.50303.0
For additional information, visit https://www.asp.net/

Azure App Service Tools v3.0.0   15.0.30209.0
Azure App Service Tools v3.0.0

Bundler & Minifier   2.4.340
Adds support for bundling and minifying JavaScript, CSS and HTML files in any project.

Common Azure Tools   1.9
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

CSS Tools   1.0.14
Provides additional features to the CSS editor in Visual Studio.

Editor Enhancements   1.0.27
Provides additional features such as HTML and URL encodings, transformations and sorting of selected text the editor.

EditorConfig Language Service   1.17.207
Language service for .editorconfig files.

EditorConfig helps developers define and maintain consistent coding styles between different editors and IDEs.

File Icons   2.7
Adds icons for files that are not recognized by Solution Explorer

File Nesting   2.6.67
Automatically nest files based on file name and enables developers to nest and unnest any file manually

HTML Tools   1.0.3
Productivity tools for the HTML editor

Image Optimizer   3.6.103
Uses industry standard tools to optimize any JPEG, PNG and Gifs - including animated Gifs. Can do both lossy and lossless optimization.

Image Sprites   1.4.47
Boost your website's performance by creating image sprites to reduce the amount of HTTP requests needed.

JavaScript Language Service   2.0
JavaScript Language Service

JavaScript Project System   2.0
JavaScript Project System

JavaScript Transpiler   0.9.24
The simplest way to transpile JS and JSX to EcmaScript 5 without any complicated node.js tools in your project. It uses the TypeScript compiler behind the scenes.

JavaScript UWP Project System   2.0
JavaScript UWP Project System

KofePackagePackage Extension   1.0
KofePackagePackage Visual Studio Extension Detailed Info

Markdown Editor   1.11.214
A full featured Markdown editor with live preview and syntax highlighting. Supports GitHub flavored Markdown.

Merq   1.1.17-rc (cba4571)
Command Bus, Event Stream and Async Manager for Visual Studio extensions.

Microsoft Azure Tools   2.9
Microsoft Azure Tools for Microsoft Visual Studio 2017 - v2.9.50131.1

Microsoft MI-Based Debugger   1.0
Provides support for connecting Visual Studio to MI compatible debuggers

Microsoft Visual Studio VC Package   1.0
Microsoft Visual Studio VC Package

Mono Debugging for Visual Studio   Mono.Debugging.VisualStudio
Support for debugging Mono processes with Visual Studio.

NuGet Package Manager   4.2.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

Open Command Line   2.1.179
Opens a command line at the root of the project. Support for all consoles such as CMD, PowerShell, Bash etc. Provides syntax highlighting, Intellisense and execution of .cmd and .bat files.

Package Installer   2.0.101
Makes it easier, faster and more convenient than ever to install Bower, npm, Yarn, JSPM, TSD, Typings and NuGet packages to any project

Package Security Alerts   1.0.17
Identifies npm and Bower packages that contains known security vulnerabilities to ensure your project is always using the most secure package versions.

Project File Tools   1.0.1
Provides Intellisense and other tooling for XML based project files such as .csproj and .vbproj files.

SQL Server Data Tools   15.1.61702.140
Microsoft SQL Server Data Tools

Syntax Highlighting Pack   2.7.125
Adds syntax highlighting and snippet support for a wide variety of programming languages such as Clojure, Go, Jade, Lua, Swift, Ruby and many more...

TypeScript   2.2.2.0
TypeScript tools for Visual Studio

Visual Studio tools for CMake   1.0
Visual Studio tools for CMake

Visual Studio Tools for Universal Windows Apps   15.0.26430.06
The Visual Studio Tools for Universal Windows apps allow you to build a single universal app experience that can reach every device running Windows 10: phone, tablet, PC, and more. It includes the Microsoft Windows 10 Software Development Kit.

Vue.js Pack 2017   1.1.8
Contains HTML Intellisense and code snippets for the Vue.js JavaScript library

Web Compiler   1.11.326
Compiler for LESS, Sass and CoffeeScript files

Xamarin   4.5.0.486 (fec6f88)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android SDK   7.3.1.2 (9dbc4c5)
Xamarin.Android Reference Assemblies and MSBuild support.

Xamarin.iOS and Xamarin.Mac SDK   10.10.0.37 (ad35de4)
Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.

ZenCoding   1.2.11
Provides ZenCoding for the HTML Editor - full support for static HTML, Razor and WebForms.
Comment 5 Brendan Zagaeski (Xamarin Team, assistant) 2017-07-11 01:43:01 UTC
> I created link in root folder C:\android-sdk

Thanks for the additional information.  This is the key detail.  The Windows file browser dialogs automatically resolve directory links to their targets, so the behavior you are seeing is in some sense the expected result. 
 But there is an extra complication with trying to use directory links in the "Android SDK Location" compared to other Visual Studio path settings because the "Android SDK Location" is not an editable text field.  I have filed a follow-up bug report about that UI inconsistency.  I will mark this bug as an approximate duplicate of that follow-up bug for tallying purposes.

*** This bug has been marked as a duplicate of bug 58066 ***