Skip to content

msbuild /t:Install fails if adb server isn't running #3269

@kdubau

Description

@kdubau

Steps to Reproduce

  1. Make sure you have a device connected and trusted
  2. Make sure Visual Studio is closed
  3. Make sure adb server is not running, adb kill-server, or end it from task manger
  4. Unzip the attached project Wat.zip
  5. Run msbuild /t:Restore C:\path\to\Wat.csproj
  6. Run msbuild /t:Install C:\path\to\Wat.csproj

Wat.zip

Expected Behavior

It should start adb and use the connected USB device to install the app.

Actual Behavior

It fails with the error:

"C:\Users\kywhi\Downloads\Wat\Wat\Wat\Wat.csproj" (Install target) (1) ->
(_Upload target) ->
  C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\MSBuild\Xamarin\Android\Xamarin.Android.Common.Debugging.
targets(624,2): error XA0010: adb is not running. System.AggregateException: One or more errors occurred. ---> System.A
ggregateException: One or more errors occurred. ---> System.Net.Sockets.SocketException: No connection could be made be
cause the target machine actively refused it 127.0.0.1:5037 [C:\Users\kywhi\Downloads\Wat\Wat\Wat\Wat.csproj]

Version Information

Microsoft Visual Studio Enterprise 2019 Int Preview
Version 16.2.0 Preview 4.0 [29020.217.d16.2stg]
VisualStudio.16.IntPreview/16.2.0-pre.4.0+29020.217.d16.2stg

Xamarin.Android SDK 9.4.0.34 (d16-2/7cce305)
Xamarin.Android Reference Assemblies and MSBuild support.
Mono: mono/mono@c6edaa62f94
Java.Interop: xamarin/java.interop/d16-2@b2b2610
LibZipSharp: grendello/LibZipSharp/d16-2@caa0c74
LibZip: nih-at/libzip@b95cf3f
ProGuard: xamarin/proguard@905836d
SQLite: xamarin/sqlite@8212a2d
Xamarin.Android Tools: xamarin/xamarin-android-tools/master@4f717b6

Log File

binlog.zip

Metadata

Metadata

Labels

Area: App+Library BuildIssues when building Library projects or Application projects.enhancementProposed change to current functionality.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions