android: Mono.Debugger hangs Visual Studio 2017 for ~3min on the "Starting Android application" step
Steps to Reproduce
- Build a Xamarin.Android project
- Run a Xamarin.Android project
Expected Behavior
The app should be deployed to the device and run.
Actual Behavior
VS hangs for ~3 min, the a message pops up, saying _Mono Debugging for Visual Studio 4.10.5 likely caused 194 seconds of unresponsiveness. _ Only after, does the app get deployed.
Version Information
Microsoft Visual Studio Professional 2017 Version 15.7.1 VisualStudio.15.Release/15.7.1+27703.2000 Microsoft .NET Framework Version 4.7.02556
Application Insights Tools for Visual Studio Package 8.12.10405.1 Application Insights Tools for Visual Studio
ASP.NET and Web Tools 2017 15.0.40501.0 ASP.NET and Web Tools 2017
ASP.NET Core Razor Language Services 15.7.31476 Provides languages services for ASP.NET Core Razor.
Azure App Service Tools v3.0.0 15.0.40424.0 Azure App Service Tools v3.0.0
C# Tools 2.8.0-beta6-62830-08. Commit Hash: e595ee276d14e14bfb3eb323fb57f2aa668bddea C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.
Common Azure Tools 1.10 Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.
JavaScript Language Service 2.0 JavaScript Language Service
Merq 1.1.17-rc (cba4571) Command Bus, Event Stream and Async Manager for Visual Studio extensions.
Microsoft Continuous Delivery Tools for Visual Studio 0.3 Simplifying the configuration of continuous build integration and continuous build delivery from within the Visual Studio IDE.
Microsoft JVM Debugger 1.0 Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines
Microsoft MI-Based Debugger 1.0 Provides support for connecting Visual Studio to MI compatible debuggers
Microsoft Visual Studio Tools for Containers 1.1 Develop, run, validate your ASP.NET Core applications in the target environment. F5 your application directly into a container with debugging, or CTRL + F5 to edit & refresh your app without having to rebuild the container.
Mono Debugging for Visual Studio 4.10.5-pre (ab58725) Support for debugging Mono processes with Visual Studio.
Multilingual App Toolkit 4.0 Multilingual App Toolkit helps you localize your Windows Store app by providing file management, pseudo and machine translation, translation editor, and build integration. http://aka.ms/matinstall
NuGet Package Manager 4.6.0 NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.
ProjectServicesPackage Extension 1.0 ProjectServicesPackage Visual Studio Extension Detailed Info
ResourcePackage Extension 1.0 ResourcePackage Visual Studio Extension Detailed Info
SQL Server Data Tools 15.1.61804.210 Microsoft SQL Server Data Tools
TypeScript Tools 15.7.20419.2003 TypeScript Tools for Microsoft Visual Studio
Visual Basic Tools 2.8.0-beta6-62830-08. Commit Hash: e595ee276d14e14bfb3eb323fb57f2aa668bddea Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.
Visual F# Tools 10.1 for F# 4.1 15.7.0.0. Commit Hash: 16ecf5a30ad868d183c58e4a71a71c23d4ed3ba9. Microsoft Visual F# Tools 10.1 for F# 4.1
Visual Studio Code Debug Adapter Host Package 1.0 Interop layer for hosting Visual Studio Code debug adapters in Visual Studio
Visual Studio Tools for Unity 3.7.0.1 Visual Studio Tools for Unity
VisualStudio.Mac 1.0 Mac Extension for Visual Studio
VSColorOutput 2.5.1 Color output for build and debug windows - http://mike-ward.net/vscoloroutput
WiX Toolset Visual Studio Extension 0.9.21.62588 WiX Toolset Visual Studio Extension version 0.9.21.62588 Copyright © .NET Foundation and contributors. All rights reserved.
Xamaridea.VisualStudioPlugin 1.0 VS + Xamarin + IDEA = Love
Xamarin 4.10.0.442 (396b18cef) Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.
Xamarin Designer 4.12.264 (fc37cd02e) Visual Studio extension to enable Xamarin Designer tools in Visual Studio.
Xamarin.Android SDK 8.3.0.19 (HEAD/342b2ce96) Xamarin.Android Reference Assemblies and MSBuild support.
Xamarin.iOS and Xamarin.Mac SDK 11.10.1.177 (7e782c1) Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.
Log File
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Comments: 51 (17 by maintainers)
I think I found the problem, on my android project, in the references, I had a bunch of invalid references to .netstandard 2.0 libraries, I deleted all those invalid references and debug seems back on the menu for me!
@nbelley : I concur. This whole debugging thing is driving me nuts.
I can confirm that this solves the issue for me as well. There seems to be something wrong with referencing a common .NET Standard library from Android/iOS projects on Windows. To fix my issues I had to uninstall the .NET Standard 2.0.2 NuGet dependencies from the Android/iOS project and also the libraries using it. I then first updated the Android project to latest .NET Standard 2.0.3 NuGet and then reinstalled all the libraries that requires the .NET Standard NuGet into the Android project.
works for me as well. The problem may have been adding the netstandard 2.0.2 nuget which adds all these bad references.
@nbelley solution worked for me too
Just to add, also, when the debugging does start after 3-4 minutes, when a breakpoint is hit, passing the cursor over a variables, the debuggers show the Getting DataTip Text popup for about 3 minutes also before unlocking.