Bug 53214 - [VS 2017] "Help > Open Logs" usually disabled and no log files written if the first Xamarin project opened is an existing Xamarin.iOS project
Summary: [VS 2017] "Help > Open Logs" usually disabled and no log files written if the...
Status: CLOSED FIXED
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: General ()
Version: 4.3.0 (C9)
Hardware: PC Windows
: --- major
Target Milestone: 15.1
Assignee: Adrian Alonso
URL:
: 51798 ()
Depends on:
Blocks:
 
Reported: 2017-03-10 05:14 UTC by Brendan Zagaeski (Xamarin Team, assistant)
Modified: 2017-04-12 07:54 UTC (History)
7 users (show)

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


Attachments
Additional version details from "Help > About Microsoft Visual Studio" (2.52 KB, application/zip)
2017-03-10 05:14 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:
CLOSED FIXED

Description Brendan Zagaeski (Xamarin Team, assistant) 2017-03-10 05:14:45 UTC
Created attachment 20261 [details]
Additional version details from "Help > About Microsoft Visual Studio"

[VS 2017] "Help > Open Logs" usually disabled and no log files written if the first Xamarin project opened is an existing Xamarin.iOS project




## Workaround

As hinted at by the reproducibility test below, it seems that a successful workaround for this issue is to create a new template iOS project as the first thing you do after you start up Visual Studio.




## Steps followed to test

1. Open a previously created "Visual C# > iOS > iPhone > Single View App (iPhone)" template project.  (Tested on a machine that had stored connection information for a remote Mac.)

2. Navigate to "Help > Xamarin > Open Logs...".




## BAD Results

- The "Open Logs" menu item is unexpectedly disabled.

- The "Zip Logs" menu item works, _but_ the resulting .zip file doesn't contain any logs from the Windows side.

- If you manually navigate to "%LOCALAPPDATA%\Xamarin\Logs\15.0", there is no new *Ide.log file present.  The only log files present are from the _first_ run in steps 1-4.




## Reproducibility

Test scenario: For 2 trials open an existing iOS project, then switch to creating a new one for 2 trials, and then repeat the whole sequence of 4 trials once more.  Quit and restart Visual Studio after each trial.

- Note: Deleting the .vs\ folder and the bin\ and obj\ folders from the existing project did not seem to help.  Perhaps the timing of expanding a new project from template is slower/different, and that avoids a timing issue with opening the log files for writing?

- Possibly related (though perhaps _intentional_) behavior: Even in the GOOD cases on VS 2017 or VS 2015, although the *Ide.log file is created, no information is written to it until the solution is closed (but after that, the information is written as expected).



### Environment A, VS 2017

4/4 BAD for existing project

0/4 BAD for freshly created "Visual C# > iOS > iPhone > Single View App (iPhone)" project



### Environment A, VS 2015

0/4 BAD for existing project

0/2 BAD for freshly created "Visual C# > iOS > iPhone > Single View App (iPhone)" project



### Environment B, VS 2017

3/4 BAD for existing project (on 1 trial, the log files and commands behaved correctly)

0/4 BAD for freshly created "Visual C# > iOS > iPhone > Single View App (iPhone)" project




## Testing environment info A, physical machine with VS 2015 and VS 2017

Microsoft Visual Studio Enterprise 2017
Version 15.0.26228.4 D15RTWSVC
Microsoft .NET Framework
Version 4.6.01586

Microsoft Visual Studio Enterprise 2015
Version 14.0.25431.01 Update 3
Microsoft .NET Framework
Version 4.6.01586

XamarinVS 4.3.0.784 (73f58d6)

Windows 10 Pro (64-bit) Version 1607 (OS Build 14393.321)
US English locale, US eastern time zone

Username: "Windows User"


### Physical Machine

Intel(R) Core(TM) i5-4590T CPU @ 2.00GHz, 2001 Mhz, 4 Core(s), 4 Logical Processor(s)
Installed Physical Memory (RAM)	12.0 GB




## Testing environment info B, Hyper-V VM with a fresh Windows 10 image and only VS 2017

Microsoft Visual Studio Enterprise 2017
Version 15.0.26228.4 D15RTWSVC
Microsoft .NET Framework
Version 4.6.01586

Windows 10 Pro (64-bit) Version 1607 (OS Build 14393.0)
US English locale, US eastern time zone

Username: "Windows User"


### Hyper-V VM

Intel(R) Core(TM) i5-4590T CPU @ 2.00GHz, 1995 Mhz, 4 Core(s), 4 Logical Processor(s)
Installed Physical Memory (RAM)	4.00 GB
Comment 2 Jose Gallardo 2017-03-16 18:50:45 UTC
This issue was fixed on Pull Requests:

master: https://github.com/xamarin/XamarinVS/pull/7069

d15-1: https://github.com/xamarin/XamarinVS/pull/7076

Waiting for approval before merging into release branch.
Comment 3 Ben Beckley 2017-03-17 00:23:41 UTC
*** Bug 51798 has been marked as a duplicate of this bug. ***
Comment 4 Neha Kharbade 2017-03-17 14:16:32 UTC
verified on 

Microsoft Visual Studio Enterprise 2015
Version 14.0.25431.01 Update 3
Microsoft .NET Framework
Version 4.6.01055
Xamarin   4.3.1.39 (a70e3a1)
Xamarin.Android   7.2.0.1 (ff38526)
Xamarin.iOS   10.8.0.17 (49a63dc)

and working fine so marking as verified.
Comment 7 Vu 2017-04-12 02:42:19 UTC
I've same issue with Visual Studio Enterprise 2017. Visual 2015 work fine, but on 2017, no log file :(

When run/build my project, visual studio show error: "One or more errors occurred.". And without log file, i don't know why error x-(
Comment 8 Brendan Zagaeski (Xamarin Team, assistant) 2017-04-12 03:11:43 UTC
> I've same issue with Visual Studio Enterprise 2017

The exact versions are crucial:

- Visual Studio Enterprise 2017 15.0 includes XamarinVS 4.3.0.784 (73f58d6), which is the version from Comment 0, where the issue is _not_ fixed.

- Visual Studio Enterprise 2017 15.1 includes XamarinVS 4.4.0.34  (3f99c5a), which is a newer version that includes the candidate _fix_ from Comment 2.


If "Help > About Microsoft Visual Studio" shows VS 2017 15.1 with XamarinVS 4.4.0.34 (3f99c5a), and the issue persists in your environment, then a new bug report that includes as much information about what might be unique to your environment compared to "Environment A" from Comment 0 would be the best way forward.




## Verification status: VERIFIED fixed on Environment A, with VS 2017 updated to 15.1 with XamarinVS 4.4.0.34 (3f99c5a)

VS 2017 15.1 with XamarinVS 4.4.0.34 (3f99c5a) has resolved the issue in the test environment used in Comment 0, so I will mark this bug as "closed" for my test environment.

0/4 BAD for existing project
Comment 9 Vu 2017-04-12 07:54:03 UTC
I've updated to latest version and everything is fine now.

Thank you :)