Bug 21679 - Improve the error message produced by the build host when `pdb2mdb` is missing
Summary: Improve the error message produced by the build host when `pdb2mdb` is missing
Status: RESOLVED INVALID
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: iOS ()
Version: 3.3
Hardware: PC Mac OS
: --- minor
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2014-07-29 22:35 UTC by Brendan Zagaeski (Xamarin Team, assistant)
Modified: 2015-09-28 14:24 UTC (History)
5 users (show)

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

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 INVALID

Description Brendan Zagaeski (Xamarin Team, assistant) 2014-07-29 22:35:11 UTC
Improve the error message produced by the build host when logging a `Win32Exception` with a `NativeErrorCode` of 2, for example when `pdb2mdb` is not on the current $PATH.


(Related: https://bugzilla.xamarin.com/show_bug.cgi?id=18428)


## Steps to reproduce

1. Delete `/usr/bin/pdb2mdb` from the build host.

2. Attempt to deploy a Xamarin.iOS app from Visual Studio.


## Result

The current error does not make it clear whether the problematic "specified file" is `pdb2mdb` or `iOSApp1.exe`.


### "Output -> Build" window

> Server returned an error. The remote server returned an error: (500) Internal Server Error.
> Server error code: 500
> Internal Server Error
> DebugInformationConverter failure during build
> Exception thrown: ApplicationName='pdb2mdb', CommandLine='"iOSApp1.exe"', CurrentDirectory='/Users/macuser/Library/Caches/Xamarin/mtbs/builds/iOSApp1/b090e92c-86c9-4242-ad9b-c59c0b18af58/assemblies', Native error= Cannot find the specified file


### Mac Server Log (and mtbserver.log)

> Exception: Exception type: System.ComponentModel.Win32Exception
> ApplicationName='pdb2mdb', CommandLine='"iOSApp1.exe"', CurrentDirectory='/Users/macuser/Library/Caches/Xamarin/mtbs/builds/iOSApp1/b090e92c-86c9-4242-ad9b-c59c0b18af58/assemblies', Native error= Cannot find the specified file
>   at System.Diagnostics.Process.Start_noshell (System.Diagnostics.ProcessStartInfo startInfo, System.Diagnostics.Process process) [0x00000] in <filename unknown>:0 
>   at System.Diagnostics.Process.Start_common (System.Diagnostics.ProcessStartInfo startInfo, System.Diagnostics.Process process) [0x00000] in <filename unknown>:0 
>   at System.Diagnostics.Process.Start () [0x00000] in <filename unknown>:0 
>   at (wrapper remoting-invoke-with-check) System.Diagnostics.Process:Start ()
>   at MonoTouch.Tools.Tools.ToolBase.RunInner (MonoTouch.Tools.Tools.RunInfo ri) [0x00000] in <filename unknown>:0 



## Possible improvement

When the build host is logging a `Win32Exception` with a `NativeErrorCode` of 2, clarify which file is the "specified file":

> ... Native error= Cannot find the specified file. Check that `pdb2mdb` can be located by `which pdb2mdb` on the Mac build host.


Other more extensive rewordings of the error message would be fine too, as long as they clearly specify that `pdb2mdb` cannot be found.


Note: `which pdb2mdb` isn't actually a perfect test in this particular case. If I put a copy of `pdb2mdb` in `/usr/local/bin/pdb2mdb`, `which pdb2mdb` can find it, but the build host cannot.



Many thanks!


## Version information

Mono 3.6.0 ((no/f540f8a)
Xamarin.iOS 7.2.6.26

XamarinVS 3.3.44
Comment 1 Enzo Heredia 2015-09-28 14:24:26 UTC
with implementation of XMA this is no longer valid.