Bug 54494 - error : Could not find 7zip.exe in Xamarin installation
Summary: error : Could not find 7zip.exe in Xamarin installation
Alias: None
Product: Components
Classification: Xamarin
Component: Xamarin Components ()
Version: Production (addons.xamarin.com)
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bill Holmes
Depends on:
Reported: 2017-04-05 15:31 UTC by Randy
Modified: 2017-05-12 18:39 UTC (History)
3 users (show)

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:

Description Randy 2017-04-05 15:31:36 UTC
Need your help on an issue I’ve been spending way too much time on trying to resolve.  Got a couple of boxes I can’t build on in San Diego and one here in FC and one here in FC that I can build on.  To my knowledge, I’ve tried everything mentioned here: https://forums.xamarin.com/discussion/71838/i-got-could-not-find-7zip-exe-in-xamarin-installation-error 

I’ve looked at versions, etc…

This was a known issue to Xamarin folks but I think they marked the issue as fixed with the unveiling of Xamarin.Build.Download 0.4.3

I need further troubleshooting steps if at all possible.

•	Getting "Could not find 7zip.exe in Xamarin installation" error on 2 out of 3 build boxes
•	Error occurs when building iOS project

Exact error:
15:39:46 f:\jnks\workspace\Chimera\cscr-metro\Xamarin\Chimera\packages\Xamarin.Build.Download.0.4.3\build\Xamarin.Build.Download.targets(51,3): error : Could not find 7zip.exe in Xamarin installation [f:\jnks\workspace\Chimera\cscr-metro\Xamarin\Chimera\Apps\HPScanJA.iOS\HPScanJA.iOS.csproj]

Machine Configuration:
Xamarin (73f58d6)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android (9578cdc)
Visual Studio extension to enable development for Xamarin.Android.

Xamarin.iOS (35d1ccd)
Visual Studio extension to enable development for Xamarin.iOS.
Comment 1 Manuel de la Peña [MSFT] 2017-04-05 17:48:50 UTC
Assigning this to the components team as per a conversation with jon.dick@xamarin.com
Comment 2 Bill Holmes 2017-04-05 19:03:07 UTC

What version of Visual Studio are you using?

Is you are using VS2017 I am concerned as it suggests that VsInstallRoot is not being set as it should.  (That is assuming that 7z exists where it should.)

Here is where we pass the expected 7z path into the download task.


This is mainly for VS2017 but you can use the XamarinBuildDownloadUser7ZipPath property to workaround the problem.  You can set the XamarinBuildDownloadUser7ZipPath property in your project to point to where 7z exists on the system.

If you are not using 2017 then we fallback to the registry to attempt to locate 7z.  You can see the code here.


Do you mind looking through this code and checking your registry on the affected machines to see what is missing or incorrect in the code or on your system?  Again this is only for less than 2017.  (2017 does not use the registry and relies only on the VsInstallRoot MSBuild property.)
Comment 3 Randy 2017-04-05 21:50:10 UTC
Using 2015 on all machines:

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

I set the property XamarinBuildDownloadUser7ZipPath as you suggested, that works.  Thanks.

I'm still need to work through the Get7ZipPath code to see what's different between the machines.

Comment 4 Randy 2017-04-10 16:22:55 UTC
Production machine works and has always worked.  Sandbox machine had this problem and was a few versions ahead of production, must have lost the registry key during an upgrade as C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Xamarin\Xamarin\7-Zip exists on the sandbox machine.  Not sure how the issue started and why the latest Xamarin.Build.Download NuGet did not fix the problem like others unless the latest was meant for Visual Studio 2017 users only.
Comment 5 Bill Holmes 2017-05-12 18:39:39 UTC
I am not sure what we can do for this defect.  It sounds as if a registry entry that should be there on the system is not there.  

I am going to mark this defect as resolved.  If that is not acceptable please reopen describing what issues you are experiencing (if any) or suggestions on how we can improve.