Bug 16301 - Various problems when running xamarin-component.exe on Windows
Summary: Various problems when running xamarin-component.exe on Windows
Status: RESOLVED FIXED
Alias: None
Product: Components
Classification: Xamarin
Component: Generation ()
Version: N/A
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bill Holmes
URL:
Depends on:
Blocks:
 
Reported: 2013-11-17 00:06 UTC by Paul Batum
Modified: 2017-09-26 18:03 UTC (History)
3 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 or GitHub 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 FIXED

Description Paul Batum 2013-11-17 00:06:59 UTC
I am trying to use xamarin-component from Windows and I got a file not found error:

    PS C:\code\azure-mobile-services\component> .\xpkg\xamarin-component.exe package
    INFO (package): No projects listed, and no_build not given, searching for solutions...
    Running C:\windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe "/p:Configuration=Release" "C:\code\azure-mobile-services\component\..\quickstart\xamarin.iOS\ZUMOAPPNAME.sln"...
    INFO (package): Creating package in C:\code\azure-mobile-services\component\azure-mobile-services-1.1.xam.
    Running mdoc "update" "--debug" "-LC:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v4.3" "-LC:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoTouch\v1.0" "--import=C:\code\azure-mobile-services\sdk\Managed\src\Microsoft.WindowsAzure.Mobile.Ext.Android\bin\Release\Microsoft.WindowsAzure.Mobile.xml" "-o" "C:\Users\pbatum\AppData\Local\Temp\azure-mobile-services-1.1-635051953\en" "C:\code\azure-mobile-services\sdk\Managed\src\Microsoft.WindowsAzure.Mobile.Ext.Android\bin\Release\Microsoft.WindowsAzure.Mobile.dll"...
    
    Unhandled Exception: System.ComponentModel.Win32Exception: The system cannot find the file specified
       at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
       at System.Diagnostics.Process.Start(ProcessStartInfo startInfo)
       at Xamarin.Components.Packaging.Utility.Exe(String command, String[] args)
       at Xamarin.Components.Packaging.Creation.PackageCreator.WriteMonodocsUsingXmldocs(ZipOutputStream zipStream, PackageSpec spec)
       at Xamarin.Components.Packaging.Creation.PackageCreator.CreatePackage(PackageSpec spec)
       at Xamarin.Components.PackageCommandHandler.Invoke(String[] args)
       at Xamarin.Components.MainClass.Main(String[] args)

I think the problem is that its looking for mdoc, and not finding it in the lib folder. If I move mdoc.exe and the dll from the lib folder into the same folder, I then get this error:

    mdoc: Could not load file or assembly 'Mono.Cecil, Version=0.9.5.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756' or one of its dependencies. The system cannot find the file specified.
    See `mdoc help' for more information.

I managed to find this in Program Files(x86)\Xamarin Studio\bin. Then I needed SharpZipLib, and the version in that folder was an older version, so then I had to find version 4.84 of SharpZipLib online somewhere.

Finally, the packaging process worked. But this took a while to figure out. I am not sure how this is supposed to work by default?
Comment 1 Bill Holmes 2017-09-26 18:03:43 UTC
This has been fixed for a while in newer version of xamarin-component.  

Commit 76f9cb14d8f7a83dbacad519db192fe36eaee71d