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 or GitHub 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.
After updating to latest VS 2017(15.2 26430.4) on May 10, 2017 we can no longer connect with the debugger on multiple different machines. Can not connect to the x86 HAXM emulator or a hardware device.
*We receive the following output:*
Android application is debugging.
05-11 10:26:12.303 W/monodroid(13457): Trying to load sgen from: /data/app/com.microsoft.msn.news-1/lib/arm64/libmonosgen-2.0.so
05-11 10:26:12.303 W/monodroid(13457): Trying to load sgen from: /data/user/0/com.microsoft.msn.news/files/.__override__/links/libmonosgen-2.0.so
05-11 10:26:12.305 W/monodroid-debug(13457): Trying to initialize the debugger with options: --debugger-agent=transport=dt_socket,loglevel=0,address=127.0.0.1:8883,server=y,embedding=1
05-11 10:26:12.305 W/monodroid-debug(13457): Accepted stdout connection: -1
05-11 10:26:12.305 F/monodroid-debug(13457): Error accepting stdout and stderr (127.0.0.1:8884): Address already in use
Could not connect to the debugger.
*Visual Studio Info*
Microsoft Visual Studio Enterprise 2017
Version 15.2 (26430.4) Release
Microsoft .NET Framework
Installed Version: Enterprise
Visual Basic 2017 00369-60000-00001-AA238
Microsoft Visual Basic 2017
Visual C# 2017 00369-60000-00001-AA238
Microsoft Visual C# 2017
Visual C++ 2017 00369-60000-00001-AA238
Microsoft Visual C++ 2017
Visual F# 4.1 00369-60000-00001-AA238
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
Common Azure Tools 1.9
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.
Merq 1.1.17-rc (cba4571)
Command Bus, Event Stream and Async Manager for Visual Studio extensions.
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/.
TypeScript tools for Visual Studio
Visual Studio Tools for Universal Windows Apps 15.0.26430.01
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.
Color output for build and debug windows - http://mike-ward.net/vscoloroutput
VsVim is a Vim emulator for Visual Studio
Xamarin 126.96.36.1993 (c871575)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.
Xamarin.Android SDK 188.8.131.52 (448f54f)
Xamarin.Android Reference Assemblies and MSBuild support.
Xamarin.iOS and Xamarin.Mac SDK 10.10.0.30 (30b6e87)
Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.
I moved the port range to a IANA unassigned segment to avoid collitions.
fixed in d15-2: https://github.com/xamarin/XamarinVS/commit/3c254b04b496d0c927c7d796f9d8e5802b72fb45
Changing ports didn't help. Reopening.
Note: Comment #1 and Comment #2 are incorrect.
Scenario: Xamarin.Android project in which `$(Optimize)` is not set
for the Debug configuration. Load project within VS 2017 and attempt
Result: app crashes on startup, debugger cannot connect.
`adb logcat` contains:
F monodroid: No assemblies found in '(null)' or '<unavailable>'. Assuming this is part of Fast Deployment. Exiting...
What's happening is that the Debug configuration app was bundling the
*Release* `libmonodroid.so`, as verified by comparing file sizes; the
deployed `libmonodroid.so` was 161244 bytes, which is the same as the
installed `libmono-android.release.so` file.
Why was a Debug configuration deployment using the Release runtime?
Because of [xamarin-android/1e0e0834], which migrated
`Xamarin.Android.Common.targets` to use `$(Optimize)` instead of the
kludge of other properties which was used previously. Commit 1e0e0834
was comparing `$(Optimize)` against False, but many existing projects
don't set `$(Optimize)` for the Debug Configuration *at all*, meaning
it was comparing the empty string to `False`, which failed, which
prompted `<BuildApk/>` to behave as if the Release runtime were
requested, which was *not* the case here.
Bump to xamarin-android/fd86ab04 which corrects the `$(Optimize)`
comparison, which will allow Debug deployment to work as intended.
I can confirm that adding the following to the debug configuration of my csproj fixed this issue.
## Bookkeeping note
Cross-reference to related developercommunity item:
Verified this issue on the build VS 2017
184.108.40.2068 and 220.127.116.113
Gist info- https://gist.github.com/mohakbarokar/8a88dab84786b327cdab71828d718a80
ScreenCast link -https://www.screencast.com/t/vcoxPy6x5
Have verified the scenario
1-Created an Xamarin Forms app (PCL & Shared)/Andorid single view app , and Verified debugger is getting hit.
2-Also verified after creating any Xamarin.forms project , the default values is set as <Optimize>false</Optimize> in csproj.
Hence marking this issue as verified and Fixed.
The verification attempts in Comment 9 and Comment 10 would not cover the scenario described in this bug report.
To test the scenario described in this bug report, it would be necessary to attempt debugging in a project configuration where the `<Optimize>` settings is _not present at all_. The publicly viewable commit in Comment 4 is not a change in the template projects, but a change in the build logic.
Created attachment 22311 [details]
Verified on VS2017 Build Xamarin 18.104.22.1681
Build Info : https://gist.github.com/p-lad/2a0eefa3fcd53353e8b216e892d7bd37
Output logs attached.
Marking Verified Fixed.
*** Bug 56755 has been marked as a duplicate of this bug. ***