Bug 40739 - In particular circumstances, attempting to debug on iOS simulator fails with an error in the logs: "Cannot register a logger before the MuxLogger has been initialized"
Summary: In particular circumstances, attempting to debug on iOS simulator fails with ...
Status: RESOLVED NOT_REPRODUCIBLE
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: iOS ()
Version: 4.0.0 (C6)
Hardware: PC Windows
: --- minor
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2016-04-27 17:34 UTC by Brendan Zagaeski (Xamarin Team, assistant)
Modified: 2016-05-12 14:49 UTC (History)
4 users (show)

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


Attachments
Log files and version info (32.08 KB, application/zip)
2016-04-27 17:34 UTC, Brendan Zagaeski (Xamarin Team, assistant)
Details


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 NOT_REPRODUCIBLE

Description Brendan Zagaeski (Xamarin Team, assistant) 2016-04-27 17:34:33 UTC
Created attachment 15859 [details]
Log files and version info

In particular circumstances, attempting to debug on iOS simulator fails with an error in the logs: "Cannot register a logger before the MuxLogger has been initialized"


I am filing this bug in part just to document this exact error message. I have not seen any other user reports of this error, so it might be quite rare to hit it. I suspect the bug might need to be marked RESOLVED NOT_REPRODUCIBLE for now. If that happens, then the Xamarin team will be waiting for additional users reports of the same issue to decide whether the bug needs to be reopened for further investigation. So please do add a reply on this bug if you hit the same issue.




## Workaround

In my case I solved the problem simply by cleaning the solution and re-attempting the deployment. This suggests to me that the problem might depend on some particular timing and that it might not happen very often.




## Regression status: not tested




## Approximate steps I followed to see the issue once

1. Update to the 24 Apr 2016 version of the Cycle 7 Betas.

2. Create a new "Visual C# > Cross-Platform > Blank Xaml App (Xamarin.Forms Portable)" solution.

3. Update only the PCL project in the solution to use Xamarin.Forms 2.2.0.31.

4. Quit Visual Studio.

5. Delete `%LOCALAPPDATA%\Xamarin\MonoTouch` on Windows, and `$HOME/.ssh/authorized_keys` on the Mac.

6. Downgrade to Cycle 6 XamarinVS 4.0.3.214.

7. Open the solution from step 2.

8. Pair with the build host and attempt to deploy to iPhone 6s iOS 9.2 simulator.




## Results


### In the "Output > Debug" window

> Launching Application for debugging...


### In the `*Ide.log` file

> System.InvalidOperationException: Cannot register a logger before the MuxLogger has been initialized.
>    at Microsoft.Build.Utilities.MuxLogger.RegisterLogger(Int32 submissionId, ILogger logger)
>    at Microsoft.VisualStudio.CommonIDE.BuildManager.BuildManagerAccessor.RegisterLogger(Int32 submissionId, Object logger)
>    at Xamarin.VisualStudio.MsBuild.MsBuildService.BuildSubmisson(IVsBuildManagerAccessor accessor, BuildSubmission submission, Boolean buildInProgress, ILogger[] loggers) in C:\Users\builder\data\lanes\3062\0dd817c0\source\XamarinVS\src\Core\VisualStudio\MsBuild\MsBuildService.cs:line 166
>    at Xamarin.VisualStudio.MsBuild.MsBuildService.RunTarget(IProjectNode projectNode, String msbuildTarget, IProgressReport progress, IDictionary`2 globalProperties, IDictionary`2 properties) in C:\Users\builder\data\lanes\3062\0dd817c0\source\XamarinVS\src\Core\VisualStudio\MsBuild\MsBuildService.cs:line 206
>    at Xamarin.VisualStudio.MsBuild.MsBuildService.RunTarget(IProjectNode projectNode, String msbuildTarget, IDictionary`2 globalProperties, IDictionary`2 properties) in C:\Users\builder\data\lanes\3062\0dd817c0\source\XamarinVS\src\Core\VisualStudio\MsBuild\MsBuildService.cs:line 181
>    at Xamarin.VisualStudio.IOS.MonoTouchProjectProperties.GetAppBundleDir(IProgressReport progress) in C:\Users\builder\data\lanes\3062\0dd817c0\source\XamarinVS\src\Core\VisualStudio.IOS\PropertyProviders\MonoTouchProjectProperties.cs:line 57
>    at Xamarin.VisualStudio.IOS.MonoTouchFlavoredProject.GetRunSessionInfo(MonoTouchDevice device) in C:\Users\builder\data\lanes\3062\0dd817c0\source\XamarinVS\src\Core\VisualStudio.IOS\ProjectSystem\MonoTouchFlavoredProject.cs:line 725
>    at Xamarin.VisualStudio.IOS.MonoTouchFlavoredProject.CreateDebuggerStartInfo(MonoTouchDevice device, IVsDebugger2 debugger, Int32 debugPort) in C:\Users\builder\data\lanes\3062\0dd817c0\source\XamarinVS\src\Core\VisualStudio.IOS\ProjectSystem\MonoTouchFlavoredProject.cs:line 621
>    at Xamarin.VisualStudio.IOS.MonoTouchFlavoredProject.GetDebugSession(MonoTouchDevice device, String outputDirectory, IVsDebugger2 debugger, IProgressReport progress) in C:\Users\builder\data\lanes\3062\0dd817c0\source\XamarinVS\src\Core\VisualStudio.IOS\ProjectSystem\MonoTouchFlavoredProject.cs:line 658
>    at Xamarin.VisualStudio.IOS.MonoTouchFlavoredProject.<>c__DisplayClass65_0.<DebugApplication>b__0() in C:\Users\builder\data\lanes\3062\0dd817c0\source\XamarinVS\src\Core\VisualStudio.IOS\ProjectSystem\MonoTouchFlavoredProject.cs:line 680
>    at System.Threading.Tasks.Task.InnerInvoke()
>    at System.Threading.Tasks.Task.Execute()




## Version info (brief)

XamarinVS 4.0.3.214 (0dd817c), English UI language
Windows 10, Swedish language and locale

Xamarin.iOS 9.6.2.1 (03ec43b)
Xcode 7.3 (10183.3) Build 7D175
Mac OS X 10.11.4