Bug 52950 - Xamarin.VS 4.3.0.784 fails to load package on Windows 8.1 + Visual Studio 2013
Summary: Xamarin.VS 4.3.0.784 fails to load package on Windows 8.1 + Visual Studio 2013
Status: RESOLVED DUPLICATE of bug 53042
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: General ()
Version: 4.3.0 (C9)
Hardware: PC Windows
: --- blocker
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-03-02 00:07 UTC by Arief Zein
Modified: 2017-03-04 00:18 UTC (History)
4 users (show)

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


Attachments
MSI Install Log (241.62 KB, text/plain)
2017-03-02 00:08 UTC, Arief Zein
Details
Visual Studio Activity Log (72.33 KB, text/xml)
2017-03-02 00:09 UTC, Arief Zein
Details
Extensions and Updates menu (89.78 KB, image/png)
2017-03-02 16:02 UTC, Arief Zein
Details
Xamarin install log from step A (771.25 KB, application/x-zip-compressed)
2017-03-02 20:20 UTC, Arief Zein
Details
merq.vsix install log - failed (1.98 KB, text/plain)
2017-03-02 20:30 UTC, Arief Zein
Details
Detailed VS version information for first attempt to reproduce the issue (unsuccessful) (3.39 KB, text/plain)
2017-03-03 18:58 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 DUPLICATE of bug 53042

Description Arief Zein 2017-03-02 00:07:05 UTC
# Steps to reproduce
Install Xamarin using the web installer, install fails (log below)
Followed on screen instruction to download Xamarin.VisualStudio_4.3.0.784 installer and ran it. Installer ran successfully.
Start up Visual Studio 2013, attempt to create an Android project, get error: "Package 'XamarinAndroidPackage" failed to load.
Similar failure on iOS.
# Expected behavior
Xamarin installs and runs without error

# Actual behavior
Xamarin fails to install. Manual install seems to work, but Xamarin packages fails to load in Visual Studio 2013.

# Supplemental info (logs, images, videos)
Installation of 'Xamarin' failed with more than one exception (attempt 3)
Errors while installing items.
Exception type: System.AggregateException
Installation of archive 'C:\Users\devadm\AppData\Local\Temp\Xamarin\downloads\Xamarin.VisualStudio_4.3.0.784.msi' failed with exception.
Exception type: Xamarin.Web.Installer.InstallException
Full stack trace:
at Xamarin.Web.Installer.Installer.InstallationArchiveHandler.Install(String path, Boolean needsPrivileges)
at System.Dynamic.UpdateDelegates.UpdateAndExecuteVoid3[T0,T1,T2](CallSite site, T0 arg0, T1 arg1, T2 arg2)
at Xamarin.Web.Installer.Installer.BaseSoftwareItem.InstallDownloadedItem(String url, InstallationArchiveHandler handler, DownloadServiceWorkItem download)
at Xamarin.Web.Installer.Installer.BaseSoftwareItem.Install(UInt32 tryNumber)
at Xamarin.Web.Installer.Installer.XamarinVSSoftwareItem.Install(UInt32 tryNumber)
at WindowsInstaller.ProgressPage.InstallationWorker()
Installation of archive 'C:\Users\devadm\AppData\Local\Temp\Xamarin\downloads\Xamarin.VisualStudio_4.3.0.784.msi' failed with exception.
Exception type: Xamarin.Web.Installer.InstallException
Full stack trace:
at Xamarin.Web.Installer.Installer.InstallationArchiveHandler.Install(String path, Boolean needsPrivileges)
at Xamarin.Web.Installer.Installer.BaseSoftwareItem.InstallDownloadedItem(String url, InstallationArchiveHandler handler, DownloadServiceWorkItem download)
at Xamarin.Web.Installer.Installer.BaseSoftwareItem.Install(UInt32 tryNumber)
at Xamarin.Web.Installer.Installer.XamarinVSSoftwareItem.Install(UInt32 tryNumber)
at WindowsInstaller.ProgressPage.InstallationWorker()
Installation of archive 'C:\Users\devadm\AppData\Local\Temp\Xamarin\downloads\Xamarin.VisualStudio_4.3.0.784.msi' failed with exception.
Exception type: Xamarin.Web.Installer.InstallException
Full stack trace:
at Xamarin.Web.Installer.Installer.InstallationArchiveHandler.Install(String path, Boolean needsPrivileges)
at Xamarin.Web.Installer.Installer.BaseSoftwareItem.InstallDownloadedItem(String url, InstallationArchiveHandler handler, DownloadServiceWorkItem download)
at Xamarin.Web.Installer.Installer.BaseSoftwareItem.Install(UInt32 tryNumber)
at Xamarin.Web.Installer.Installer.XamarinVSSoftwareItem.Install(UInt32 tryNumber)
at WindowsInstaller.ProgressPage.InstallationWorker()

# Test environment (full version information)
Microsoft Visual Studio Professional 2013
Version 12.0.31101.00 Update 4
Microsoft .NET Framework
Version 4.6.00081

Installed Version: Professional

LightSwitch for Visual Studio 2013   06177-004-0447006-02542
Microsoft LightSwitch for Visual Studio 2013

Team Explorer for Visual Studio 2013   06177-004-0447006-02542
Microsoft Team Explorer for Visual Studio 2013

Visual Basic 2013   06177-004-0447006-02542
Microsoft Visual Basic 2013

Visual C# 2013   06177-004-0447006-02542
Microsoft Visual C# 2013

Visual C++ 2013   06177-004-0447006-02542
Microsoft Visual C++ 2013

Visual F# 2013   06177-004-0447006-02542
Microsoft Visual F# 2013

Visual Studio 2013 Code Analysis Spell Checker   06177-004-0447006-02542
Microsoft® Visual Studio® 2013 Code Analysis Spell Checker

Portions of International CorrectSpell™ spelling correction system © 1993 by Lernout & Hauspie Speech Products N.V. All rights reserved.

The American Heritage® Dictionary of the English Language, Third Edition Copyright © 1992 Houghton Mifflin Company. Electronic version licensed from Lernout & Hauspie Speech Products N.V. All rights reserved.

Windows Phone SDK 8.0 - ENU   06177-004-0447006-02542
Windows Phone SDK 8.0 - ENU

Application Insights Tools for Visual Studio Package   1.0
Application Insights Tools for Visual Studio

ASP.NET and Web Tools   12.4.51016.0
Microsoft Web Developer Tools contains the following components:
Support for creating and opening ASP.NET web projects
Browser Link: A communication channel between Visual Studio and browsers
Editor extensions for HTML, CSS, and JavaScript
Page Inspector: Inspection tool for ASP.NET web projects
Scaffolding: A framework for building and running code generators
Server Explorer extensions for Microsoft Azure Websites
Web publishing: Extensions for publishing ASP.NET web projects to hosting providers, on-premises servers, or Microsoft Azure

ASP.NET Web Frameworks and Tools 2012.2   4.1.21001.0
For additional information, visit http://go.microsoft.com/fwlink/?LinkID=309563

ASP.NET Web Frameworks and Tools 2013   5.2.21010.0
For additional information, visit http://www.asp.net/

Common Azure Tools   1.3
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

CreateLayoutWizard   1.0
Create layout wizard.

Infragistics.VSExtension   1.0
Infragistics Visual Studio Extension (AddIn) adds scheduled check for update functionality to your Visual Studio IDE. It also provides some fast shortcuts to infragistics products and online resources.

JustDecompile Tools   1.0
Makes JustDecompile functionality available in VIsual Studio. Requires JustDecompile installation.

Microsoft Advertising SDK for Windows Phone   
Microsoft Advertising SDK for Windows Phone
Build 

Microsoft Azure Mobile Services Tools   1.3
Microsoft Azure Mobile Services Tools

NuGet Package Manager   2.8.50926.663
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

Office Developer Tools for Visual Studio 2013 ENU   12.0.30626
Microsoft Office Developer Tools for Visual Studio 2013 ENU

PowerShell Tools   1.3
Provides file classification services using PowerShell

PreEmptive Analytics Visualizer   1.2
Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.

SQL Server Data Tools   12.0.41012.0
Microsoft SQL Server Data Tools

Windows Phone 8.1 SDK Integration   1.0
This package integrates the tools for the Windows Phone 8.1 SDK into the menus and controls of Visual Studio.

Workflow Manager Tools 1.0   1.0
This package contains the necessary Visual Studio integration components for Workflow Manager.

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

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

Xamarin.iOS   10.4.0.123 (35d1ccd)
Visual Studio extension to enable development for Xamarin.iOS.

XtraReports package   1.0
XtraReports package
Comment 1 Arief Zein 2017-03-02 00:08:33 UTC
Created attachment 20078 [details]
MSI Install Log
Comment 2 Arief Zein 2017-03-02 00:09:23 UTC
Created attachment 20079 [details]
Visual Studio Activity Log
Comment 4 Brendan Zagaeski (Xamarin Team, assistant) 2017-03-02 04:18:42 UTC
Non-engineering team preliminary quick review



## Focuses on one problem?

Not exclusively.  The report describes 2 separate issues.  The first problem is an issue with XamarinInstaller.exe.  By chance that issue is already being tracked in non-public Bug 52793.  The workaround for that issue is what the reporter of this Bug 52950 found: run the .msi installer separately outside of the XamarinInstaller.exe program.

The remainder of the discussion on this Bug 52950 will focus on the _second_ problem:
> "Package 'XamarinAndroidPackage" failed to load.



## Suspected to be a regression or a problem with a new feature?

Not specifically.  This appears to be a new Xamarin installation on a fresh machine.  These kinds of package load problems are often caused by hiccups in Visual Studio's extension installation mechanism, and those can affect any version of the Xamarin extensions, so I wouldn't suspect a regression in Xamarin based on the information so far.



## Specific to one particular project, development computer, or target mobile device?

Yes, the issue is likely specific to the particular development computer as well as an unfortunate chance where Visual Studio has hit a hiccup when running the Xamarin extensions installation.

Sometimes these issues can be resolved by cleaning the installation and re-retrying.  See the following guide for step-by-step details:
https://developer.xamarin.com/guides/cross-platform/getting_started/visual_studio_with_xamarin/troubleshooting/uninstall-xamarinvs/



## Already took up time for many users?

Not yet.  So far there the reporter is the only user on CC on this bug report, and there aren't yet any other matching reports among the other Cycle 9 bug reports.  As hinted at in the previous questions, the best guess at the moment would be that this issue is an unfortunate installation hiccup on this particular development environment that is not too specific to the particular Xamarin version being installed.



## Makes development (a) difficult, impossible, or potentially hazardous, (b) moderately inconvenient, or (c) mildly inconvenient for users?

(a) At the moment this issue is preventing any usage of the IDE for Xamarin projects for the reporter of this bug.
Comment 5 Jose Gallardo 2017-03-02 14:02:38 UTC
Hi Arief,

Can you confirm if the Merq extension (Extensibility Message Bus) on the "Tools - Extensions and Updates" menu, is Installed and Enabled?

If it's installed and disabled, can you please open Visual Studio as Administrator, and  enable it? It might be disabled by the original failed install, and it wasn't reinstalled because it's already in, but disabled, making all the packages to fail.

Please confirm if that helps.

Thanks!
Comment 6 Arief Zein 2017-03-02 16:01:39 UTC
Hi Jose,

I do not have that extension in my "Extensions and Updates" menu.
I'll also attach a screenshot of that menu.

Thanks,
Arief
Comment 7 Arief Zein 2017-03-02 16:02:03 UTC
Created attachment 20090 [details]
Extensions and Updates menu
Comment 8 Arief Zein 2017-03-02 17:05:25 UTC
I have just finished following the troubleshooting steps linked by Brendan at https://developer.xamarin.com/guides/cross-platform/getting_started/visual_studio_with_xamarin/troubleshooting/uninstall-xamarinvs/

These did not help, I still have the same error after following the troubleshooting steps. Also followed the postscript suggestion of creating a new Windows user account, and the same error still happens under the new user account.
Comment 9 Brendan Zagaeski (Xamarin Team, assistant) 2017-03-02 19:51:20 UTC
This bug report seems to be headed toward troubleshooting of a fairly uncommon environment issue, so it will be handled a bit differently moving forward compared to other reports that would require a direct change in Xamarin.  In any case, assuming your latest ActivityLog.xml is still showing the same issue with the Merq extension (and assuming that the Merq extension still isn't showing up in your list of installed extensions), here are a couple next things to try.




## (A) Collect the installer log from the .msi

Uninstall Xamarin via the Control Panel once more.  Then install again, but this time collect the installation log file from the .msi by running the installation in a cmd.exe command prompt:

msiexec /i "%USERPROFILE%\Downloads\Xamarin.VisualStudio_4.3.0.784.msi" /l*vx "%USERPROFILE%\Desktop\Xamarin.log"


Assuming you still hit the same Merq error in the ActivityLog.xml after this step, please attach back the "Xamarin.log" file from your Desktop.




## (B) Next, try manually installing the Merq VSIX specifically


1. Manually extract the .msi to a temporary location.  For example, in a cmd.exe command prompt, run a command similar to the following, adjusting the path to .msi and the TARGETDIR as needed:

msiexec /a "%USERPROFILE%\Downloads\Xamarin.VisualStudio_4.3.0.784.msi" /qb TARGETDIR="%USERPROFILE%\Desktop\XamarinInstaller"


2. Once the expansion is completed, search within the XamarinInstaller output folder to find Merq.vsix (in the "Microsoft Shared\VisualStudio" sub-folder).


3. Try double-clicking that file to install it.



### If the installation fails 

You can check (and attach back) the latest "VSIXInstaller" log file from [2].

[2] %LOCALAPPDATA%\Temp



### If the installation succeeds, and now the Merq extension is visible in VS, but Xamarin still doesn't load

Collect and attach back the ActivityLog.xml once more.




Thanks in advance!
Comment 10 Arief Zein 2017-03-02 20:20:13 UTC
Created attachment 20099 [details]
Xamarin install log from step A

Xamarin install log from step A. Problem still exists, will try step B.
Comment 11 Arief Zein 2017-03-02 20:30:20 UTC
Created attachment 20100 [details]
merq.vsix install log - failed

Step B.
Extracted the .msi, double clicked merq.vsix. Install failed with "SignatureDescription could not be created for the signature algorithm supplied" error. Log file attached.
Comment 12 Arief Zein 2017-03-02 21:25:21 UTC
As it stands now, I have followed Brendan's latest suggestions. I am unable to install merq.vsix manually from the extracted .msi, and the same package load error still persists.
Comment 13 Brendan Zagaeski (Xamarin Team, assistant) 2017-03-02 21:35:11 UTC
I'll surface the error from Comment 11 for visibility.

> System.Security.Cryptography.CryptographicException: SignatureDescription could not be created for the signature algorithm supplied.
>    at System.Security.Cryptography.Xml.SignedXml.CheckSignedInfo(AsymmetricAlgorithm key)
>    at System.Security.Cryptography.Xml.SignedXml.CheckSignature(AsymmetricAlgorithm key)
>    at System.Security.Cryptography.Xml.SignedXml.CheckSignature(X509Certificate2 certificate, Boolean verifySignatureOnly)
>    at MS.Internal.IO.Packaging.XmlDigitalSignatureProcessor.Verify(X509Certificate2 signer)
>    at System.IO.Packaging.PackageDigitalSignature.Verify(X509Certificate signingCertificate)
>    at System.IO.Packaging.PackageDigitalSignature.Verify()
>    at Microsoft.VisualStudio.ExtensionManager.InstallableExtensionImpl.GetSignatureState(ZipPackage vsixPackage)
>    at Microsoft.VisualStudio.ExtensionManager.InstallableExtensionImpl.get_SignatureState()
>    at VSIXInstaller.App.LogExtensionDetails(IExtension extension)
>    at VSIXInstaller.App.InitializeInstall()
>    at System.Threading.Tasks.Task.InnerInvoke()
>    at System.Threading.Tasks.Task.Execute()


Based on a quick web search, this appears to be some kind of environment issue with certain kinds of signatures on the VSIX package [1].  Curiously, the reporter of this bug has VS 2013 Update 4 installed with .NET 4.6, so the precise explanation provided in [1] does not quite account for the behavior in this case.

[1] https://blogs.msdn.microsoft.com/smondal/2012/08/24/signaturedescription-could-not-be-created-for-the-signature-algorithm-supplied/


The OS version shown in Comment 1 is Windows 8.1 v6.3.9600, which should be OK I believe.  I can try a quick test in Windows 8.1 VM that only has VS 2013 installed to double-check.
Comment 14 Daniel Cazzulino 2017-03-03 16:58:55 UTC
Arief, could you plz try installing this VSIX from an earlier RC build?

https://ci.appveyor.com/api/buildjobs/95782ajflc00f78b/artifacts/out%2FMerq.1.1.13-dev15rc3.vsix

After that build, we had to switch to building with the VS2017 VSSDK and that might have broken the signature expected by VS2013.
Comment 15 Arief Zein 2017-03-03 17:14:20 UTC
@Daniel, that vsix installs correctly, and it seems to also have fixed the package load failure. Preliminary testing shows that Xamarin.VS is now working correctly.

So if I'm understanding this correctly, the current 4.3.0.784 installers breaks compatibility with Visual Studio 2013. 
What's worse is it's a bit of a silent failure scenario. If you install through the web installer, it will fail, but then it points you to a workaround (manual install using the offline .msi installer) which _appears_ to install successfully, but fails in the background installing this vsix. And then when you try to use Xamarin in Visual Studio everything just falls over. 

I'd imagine this would affect anyone that's on Visual Studio 2013?
Comment 16 Brendan Zagaeski (Xamarin Team, assistant) 2017-03-03 18:58:41 UTC
Created attachment 20123 [details]
Detailed VS version information for first attempt to reproduce the issue (unsuccessful)

> I'd imagine this would affect anyone that's on Visual Studio 2013?

Interestingly (or curiously) this does _not_ seem to be reproducible on all Visual Studio 2013 installations.  For example, in my initial "double-check" (to follow-up from Comment 13), I was not able to hit the issue.  The Merq extension installed without issue, and the Xamarin extensions loaded and behaved as expected.  I will plan to try a couple other quick experiments to see if I might be able to hit the issue by matching versions more closely with the reporter of the bug.




## Steps followed to attempt to replicate


1. Start with a Windows 8.1 VM snapshot that has only had up to Visual Studio 2013 Update 3 installed (and never any version of Visual Studio 2015).  For this initial test, just by chance my old VM image had Xamarin 3.9 installed.  I will plan to try a follow-up test on an earlier snapshot that never had any Xamarin extensions installed.


2. Install the pre-requisites for Xamarin 4.3.0.784: .NET framework 4.6 [1], and MSBuild Tools 2015 [2]

[1] I used .NET Framework 4.6.2, https://www.microsoft.com/en-us/download/details.aspx?id=53345

[2] http://www.microsoft.com/en-us/download/details.aspx?id=48159


3. Install Xamarin 4.3.0.784 by double-clicking and running the .msi installer from Explorer.


4. Create a new "Cross-Platform > Cross Platform App" with "Xamarin.Forms" and "Shared Project".




## GOOD Results in this test scenario

- The Merq extension installed successfully: it appears in my Visual Studio version information as well as under the name "Extensibility Message Bus" in "TOOLS > Extensions and Updates".

- The Xamarin.Forms template expanded properly and started restoring the Android Support Libraries for the Xamarin.Android project, as expected.




## Testing environment info (brief)

Microsoft Visual Studio Professional 2013
Version 12.0.30723.00 Update 3
Microsoft .NET Framework
Version 4.6.01590

Windows 8.1 Pro (64-bit) Version 6.3 (Build 9600)
US English locale, US eastern time zone
Comment 17 Ben Beckley 2017-03-03 19:32:12 UTC Comment hidden (obsolete)
Comment 18 Brendan Zagaeski (Xamarin Team, assistant) 2017-03-03 23:21:54 UTC
## Status update

I was able to replicate this issue by downgrading to .NET Framework 4.6.1 or earlier.  I will file a follow-up report to provide a clean starting point for discussing that version requirement (to ensure that that issue is tackled independently of the separate issue for the XamarinInstaller.exe described in Comment 0).

I will resolve this bug as a duplicate of that new bug once it's ready.
Comment 19 Brendan Zagaeski (Xamarin Team, assistant) 2017-03-04 00:18:22 UTC

*** This bug has been marked as a duplicate of bug 53042 ***