Hi,
Using the Xamarin.Forms (PCL), I created a cross platform solution in my Visual Studio 2017. Without making any modification to the generated solution, I set the Android project as the start project. Chose a VS 5.7" marshmallow emulator from the dropdown and hit the run button. It takes quite a while for the project to build and deploy, especially the deploy part. The emulator shows up on-screen and after the painfully slow deployment process completes, the application screen appears on the emulator for a fraction of a second and the debug process stops. I have no clue what is going on. On the other hand, both my iOS project and my UWP projects seems to work perfectly. I can see the Windows phone emulator and the app screen when I choose UWP, the iphone emulator on my agent Mac machine and the app screen, when I choose the iOS project. If I generate the project on my Mac using Xamarin.Studio, it seems both Android and iOS apps work fine. I have been trying to find a solution for this issue for a few days now without success. I am listing my windows environment and the xamarin log file content after the android application stops.
Environment:
Intel i7
Windows 10 Education
32GB RAM
Virtualization enabled in BIOS
Hyper-V enabled in Windows.
All Xamarin nuget packages and emulators updated
Visual Studio 2017 Professional
Log file content:
Xamarin.VisualStudio.TastyPackage|Information|0|Hooked up SDB tracing adapter
Xamarin.VisualStudio.TastyPackage|Information|0|Initialization finished
Xamarin|Information|0|Xamarin - 4.4.0.34-d15-1+3f99c5a
Xamarin.VisualStudio.Activation.AccountManager|Information|0|VS2016 Professional
Xamarin.VisualStudio.ActivationManager|Information|0|No license found for iOS
Xamarin.VisualStudio.ActivationManager|Information|0|Running license sync for iOS
Xamarin.VisualStudio.ActivationManager|Information|0|Not logged in, using iOS VSProfessional
Xamarin.VisualStudio.ActivationManager|Information|0|No license found for Android
Xamarin.VisualStudio.ActivationManager|Information|0|Running license sync for Android
Xamarin.VisualStudio.ActivationManager|Information|0|Not logged in, using Android VSProfessional
Xamarin.VisualStudio.TastyPackage|Information|0|Hooked up SDB tracing adapter
Xamarin.VisualStudio.TastyPackage|Information|0|Initialization finished
Xamarin.VisualStudio.Android.XamarinAndroidPackage|Warning|0|Initializing Xamarin.VisualStudio.Android.XamarinAndroidPackage
Xamarin.VisualStudio.TastyPackage|Information|0|Hooked up SDB tracing adapter
Xamarin.VisualStudio.TastyPackage|Information|0|Initialization finished
Xamarin.VisualStudio.IOS.XamarinIOSPackage|Warning|0|Initializing Xamarin.VisualStudio.IOS.XamarinIOSPackage.
Xamarin.VisualStudio.ProjectFixerRunner|Information|0|Solution loaded: 'App4'
Xamarin.VisualStudio.ProjectFixerRunner|Information|0|running fixup on project 'D:\Temp\App4\App4\App4.Android\App4.Android.csproj'
Xamarin.VisualStudio.ProjectFixerRunner|Information|0|running fixup on project 'D:\Temp\App4\App4\App4.iOS\App4.iOS.csproj'
Xamarin.VisualStudio.Remote.State.ServerStateContext|Information|0|Server State transition from DisconnectedState to SshConnectingState on 192.168.0.6 (192.168.0.6)
Xamarin.Messaging.Ssh.MessagingService|Information|0|Starting connection to Mac 192.168.0.6...
Xamarin.VisualStudio.Remote.State.DisconnectedState|Error|0|A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
System.Net.Sockets.SocketException (0x80004005): A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
at Renci.SshNet.Abstractions.SocketAbstraction.Connect(IPEndPoint remoteEndpoint, TimeSpan connectTimeout)
at Renci.SshNet.Session.SocketConnect(String host, Int32 port)
at Renci.SshNet.Session.Connect()
at Renci.SshNet.BaseClient.Connect()
at Xamarin.Messaging.Ssh.SshMessagingConnection.ConnectSsh() in C:\d\lanes\4471\3f99c5a7\source\xamarinvs\src\Messaging\Xamarin.Messaging.Ssh\SshMessagingConnection.cs:line 130
at Xamarin.Messaging.Ssh.MessagingService.d__65.MoveNext() in C:\d\lanes\4471\3f99c5a7\source\xamarinvs\src\Messaging\Xamarin.Messaging.Ssh\MessagingService.cs:line 227
Xamarin.VisualStudio.Remote.State.DisconnectedState|Error|0|Couldn't connect to 192.168.0.6. Please try again.
Xamarin.VisualStudio.Remote.State.ServerStateContext|Information|0|Server State transition from SshConnectingState to DisconnectedState on 192.168.0.6 (192.168.0.6)
Xamarin.VisualStudio.Remote.State.ServerStateContext|Information|0|Disconnected from the Mac 192.168.0.6 (192.168.0.6)
Xamarin.VisualStudio.Android.AndroidDeviceSettings|Information|0|Settings successfully saved.
Xamarin.VisualStudio.IOS.XamarinIOSPackage|Error|0|MonoAndroidDebuggerSession
Mono.Debugging.Soft.ConnectionException: Could not connect to the debugger. ---> Mono.Debugger.Soft.VMDisconnectedException: Exception of type 'Mono.Debugger.Soft.VMDisconnectedException' was thrown.
Server stack trace:
at Mono.Debugger.Soft.Connection.SendReceive(CommandSet command_set, Int32 command, PacketWriter packet)
at Mono.Debugger.Soft.Connection.VM_GetVersion()
at Mono.Debugger.Soft.Connection.Connect()
at Mono.Debugger.Soft.VirtualMachine.connect()
at Mono.Debugger.Soft.VirtualMachineManager.Connect(Connection transport, StreamReader standardOutput, StreamReader standardError)
at Mono.Debugger.Soft.VirtualMachineManager.ConnectInternal(Socket dbg_sock, Socket con_sock, IPEndPoint dbg_ep, IPEndPoint con_ep, TextWriter logWriter)
at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(IMessage msg, IMessageSink replySink)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.EndInvokeHelper(Message reqMsg, Boolean bProxyCase)
at System.Runtime.Remoting.Proxies.RemotingProxy.Invoke(Object NotUsed, MessageData& msgData)
at Mono.Debugger.Soft.VirtualMachineManager.ConnectCallback.EndInvoke(IAsyncResult result)
at Mono.Debugger.Soft.VirtualMachineManager.EndConnect(IAsyncResult asyncResult)
at Mono.Debugging.Soft.SoftDebuggerSession.<>c__DisplayClass57_0.b__0(IAsyncResult ar)
--- End of inner exception stack trace ---
Mono.Debugging.VisualStudio.MonoDebuggerLauncher|Error|0|Mono.Debugging.Soft.ConnectionException: Could not connect to the debugger. ---> Mono.Debugger.Soft.VMDisconnectedException: Exception of type 'Mono.Debugger.Soft.VMDisconnectedException' was thrown.
Server stack trace:
at Mono.Debugger.Soft.Connection.SendReceive(CommandSet command_set, Int32 command, PacketWriter packet)
at Mono.Debugger.Soft.Connection.VM_GetVersion()
at Mono.Debugger.Soft.Connection.Connect()
at Mono.Debugger.Soft.VirtualMachine.connect()
at Mono.Debugger.Soft.VirtualMachineManager.Connect(Connection transport, StreamReader standardOutput, StreamReader standardError)
at Mono.Debugger.Soft.VirtualMachineManager.ConnectInternal(Socket dbg_sock, Socket con_sock, IPEndPoint dbg_ep, IPEndPoint con_ep, TextWriter logWriter)
at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(IMessage msg, IMessageSink replySink)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.EndInvokeHelper(Message reqMsg, Boolean bProxyCase)
at System.Runtime.Remoting.Proxies.RemotingProxy.Invoke(Object NotUsed, MessageData& msgData)
at Mono.Debugger.Soft.VirtualMachineManager.ConnectCallback.EndInvoke(IAsyncResult result)
at Mono.Debugger.Soft.VirtualMachineManager.EndConnect(IAsyncResult asyncResult)
at Mono.Debugging.Soft.SoftDebuggerSession.<>c__DisplayClass57_0.b__0(IAsyncResult ar)
--- End of inner exception stack trace ---
Xamarin.VisualStudio.Android.MonoAndroidFlavoredProject|Error|0|The method or operation is not implemented.
System.NotImplementedException: The method or operation is not implemented.
at EnvDTE.Project.get_UniqueName()
at Clide.Solution.Adapters.DteToSolutionAdapter.Adapt(Project from) in c:\projects\clide\src\Clide\Solution\Implementation\Adapters\DteToSolutionAdapter.cs:line 56
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
at Microsoft.VisualStudio.ErrorHandler.ThrowOnFailure(Int32 hr, Int32[] expectedHRFailure)
at Microsoft.VisualStudio.Shell.Flavor.FlavoredProjectBase.GetGuidProperty(UInt32 itemId, Int32 propId)
at Xamarin.VisualStudio.Android.MonoAndroidFlavoredProject.GetGuidProperty(UInt32 itemId, Int32 propId) in C:\d\lanes\4471\3f99c5a7\source\xamarinvs\src\Core\VisualStudio.Android\ProjectSystem\MonoAndroidFlavoredProject.cs:line 335