Bug 53042 - [Cycle 9] Installer does not enforce requirement to have at least (a) VS 2013 Update 5 or (b) .NET Framework 4.6.2, resulting in "The 'XamarinShellPackage' package did not load correctly." due to "No exports were found ... Merq.IEventStream"
Summary: [Cycle 9] Installer does not enforce requirement to have at least (a) VS 2013...
Status: VERIFIED FIXED
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: Installer ()
Version: 4.3.0 (C9)
Hardware: PC Windows
: --- normal
Target Milestone: 15.2
Assignee: Bugzilla
URL:
: 52950 ()
Depends on:
Blocks:
 
Reported: 2017-03-03 23:50 UTC by Brendan Zagaeski (Xamarin Team, assistant)
Modified: 2017-06-19 12:44 UTC (History)
6 users (show)

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


Attachments
Detailed version info and log files (8.25 KB, application/zip)
2017-03-03 23:50 UTC, Brendan Zagaeski (Xamarin Team, assistant)
Details
Build and Deployment IDE logs (966.69 KB, application/octet-stream)
2017-05-11 07:00 UTC, Sumanta Welekar
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:
VERIFIED FIXED

Description Brendan Zagaeski (Xamarin Team, assistant) 2017-03-03 23:50:29 UTC
[Cycle 9] Installer does not enforce .NET Framework 4.6.2 requirement, resulting in "The 'XamarinShellPackage' package did not load correctly." due to "No exports were found ... Merq.IEventStream"




## Upstream version dependency status: installing the latest Merq.vsix component requires at least .NET Framework 4.6.2

GOOD: .NET Framework 4.6.2 [1]
BAD:  .NET Framework 4.6.1 [2]
BAD:  .NET Framework 4.6   [3]

[1] https://www.microsoft.com/en-us/download/details.aspx?id=53345
[2] https://www.microsoft.com/en-us/download/details.aspx?id=49981
[3] https://www.microsoft.com/en-us/download/details.aspx?id=48130


(Updating my environment to .NET Framework 4.6.2, rebooting, and then running the "Repair" option on the Xamarin.VisualStudio .msi successfully enabled the Xamarin extensions in Visual Studio.)




## Possible improvements

This seems like it's probably an acceptable version dependency to have as a requirement?  If so, it would be good to update the .msi to check for that version as the new minimum (it currently checks for 4.6 or higher).  The release notes can also be updated to reflect this version dependency.




## Steps followed to replicate

1. Start with a Windows 8.1 VM snapshot that has only had up to Visual Studio 2013 Update 4 installed (and never any version of Visual Studio 2015).  The VM snapshot also never had any Xamarin version installed.


2. Install the additional pre-requisites for Xamarin 4.3.0.784.  Be sure to use .NET framework 4.6.1 or lower.  Also install Microsoft Build Tools 2015 [4].

[4] 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. Attempt to create a new "Visual C# > Android" project.




## BAD Results with .NET Framework 4.6.1 or 4.6


- An error dialog appears in Visual Studio with the message:

> The 'XamarinShellPackage' package did not load correctly.

- The corresponding ActivityLog.xml file (as included in the attachment) shows an error because the Merq extension was not installed successfully and is not available:

> <type>Error</type>
> <source>VisualStudio</source>
> <description>SetSite failed for package [XamarinShellPackage]</description>
> <guid>{2D510815-1C4E-4210-BD82-3D9D2C56C140}</guid>
> <hr>80131500</hr>
> <errorinfo>No exports were found that match the constraint: 
> ContractName	Merq.IEventStream
> RequiredTypeIdentity	Merq.IEventStream</errorinfo>



## Narrower test for 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.




## BAD Results with .NET Framework 4.6.1 or 4.6

The VSIX Installer dialog shows an error:

> The installation was unable to install the extension to all the
> selected products. For more information, click on the install log link
> at the bottom of the dialog.
> 
> SignatureDescription could not be created for the signature algorithm
> supplied.
(The VSIX installer log file is included in the attachment.)




## Testing environment info (brief)

Microsoft Visual Studio Professional 2013
Version 12.0.31101.00 Update 4
Microsoft .NET Framework
Version 4.6.00081

Windows 8.1 Pro (64-bit) Version 6.3 (Build 9600)
US English locale, US eastern time zone
Comment 1 Brendan Zagaeski (Xamarin Team, assistant) 2017-03-03 23:50:55 UTC
Created attachment 20130 [details]
Detailed version info and log files
Comment 2 Brendan Zagaeski (Xamarin Team, assistant) 2017-03-04 00:17:52 UTC
## Suspected to be a regression or a problem with a new feature?

Yes, this is a new "feature" in the form of a new version dependency introduced in XamarinVS 4.3 compared to 4.2.  This appears to be due to the switch to building the VSIX with the Visual Studio 2017 VSSDK (Bug 52950, Comment 14).


### Merq.vsix compatible with .NET 4.6.1?

NO:  XamarinVS 4.3.0.784 (73f58d6)
NO:  XamarinVS 4.3.0.636 (15692db)
YES: XamarinVS 4.2.2.11  (00fa5cc)




## Already took up time for many users?

Not yet.  So far there is one user on CC who ran into this issue.  It is possible that most users have upgraded to .NET Framework 4.6.2 already, so the issue might or might see an increasing number of reports as more users move to XamarinVS 4.3.




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

(b) The issue is fairly easy to work around _if_ a user is able to find this bug report to identify the requirement to update to .NET 4.6.2.  Unfortunately, the way that the .msi installer fails silently makes this issue more difficult for users to troubleshoot.  Also the "The 'XamarinShellPackage' package did not load correctly." error is fairly generic and might not lead affected users to this bug report too quickly.
Comment 3 Brendan Zagaeski (Xamarin Team, assistant) 2017-03-04 00:18:22 UTC
*** Bug 52950 has been marked as a duplicate of this bug. ***
Comment 4 Daniel Cazzulino 2017-03-30 13:09:13 UTC
Proposed fix at https://github.com/xamarin/XamarinVS/pull/7159
Comment 5 xamarin-release-manager 2017-03-30 13:19:09 UTC
Fixed in version 4.5.0.35 (master)

Author: Daniel Cazzulino
Commit: 9413c2e50992d7a79eae2792fea446f4dc5442f3 (xamarin/XamarinVS)
Comment 7 Daniel Cazzulino 2017-03-30 15:00:43 UTC
Brendan, even though the report is for the MSI-installed Xamarin, could we verify that this dependency also exists for VS2017? IWO, unchecking `.NET Framework 4.6.2 development` in Willow, causes our package to fail too under VS2017?
Comment 9 Brendan Zagaeski (Xamarin Team, assistant) 2017-03-31 06:27:14 UTC
## Reopening bug due to an _important correction_ to Comment 0

In further testing today to answer Comment 7, I found that the required dependency for the Merq.vsix can be resolved in more than one way.  It is _not_ required to have .NET Framework 4.6.2 installed as long as you have at least VS 2013 Update 5 installed.

Apologies for the initial misleading information in the original assessment.  Although the proposed fix from Comment 4 might still be fine, perhaps it would be even better to adjust the fix to account for this new information.  In particular, Visual Studio 2017 itself still only installs .NET Framework 4.6.1 (additional details below), so if possible it might be best if the Xamarin tools enforce at most only that same dependency (or even make no changes to the .NET Framework dependency for now and instead strictly require VS 2013 Update 5 or higher).




## Upstream version dependency status: installing the latest Merq.vsix component requires at least .NET Framework 4.6.2 *OR* Visual Studio 2013 Update 5 or higher


### GOOD with .NET Framework < 4.6.2, and Visual Studio >= VS 2013 Update 5

> GOOD: Windows 8.1 6.3.9600   + .NET Framework 4.6   (4.6.00081) [1] + Visual Studio 2015 RTM      (14.0.23107.0)
> GOOD: Windows 8.1 6.3.9600   + .NET Framework 4.6.1 (4.6.01055) [2] + Visual Studio 2013 Update 5 (12.0.40629.00)

### GOOD with .NET Framework >= 4.6.2, and Visual Studio < VS 2013 Update 5

> GOOD: Windows 10 Anniversary + .NET Framework 4.6.2 (4.6.01586) [3] + Visual Studio 2013 RTM      (12.0.21005.1)
> GOOD: Windows 8.1 6.3.9600   + .NET Framework 4.6.2 (4.6.01590) [4] + Visual Studio 2013 Update 4 (12.0.31101.00)

### BAD with .NET Framework < 4.6.2, and Visual Studio < VS 2013 Update 5

> BAD:  Windows 8.1 6.3.9600   + .NET Framework 4.6.1 (4.6.01055) [2] + Visual Studio 2013 Update 4 (12.0.31101.00)


### Appendix: Corresponding .NET Framework "Release" DWORD registry values

[1] 393297
[2] 394271
[3] 394802
[4] 394806

I looked up the "Release" value before each test under the "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full" registry key.

See https://msdn.microsoft.com/library/hh925568.aspx.




## Side note: Visual Studio 2017 RTW (26228.10) as published on March 28 installs .NET 4.6.1

.NET 4.6.1 is the expected installed version in this case as documented in the VS 2017 system requirements:
https://www.visualstudio.com/productinfo/vs2017-system-requirements-vs



### Steps followed to double-check


1. Start with a clean Windows 8.1 system image that has update KB2919355 installed.


2. The .NET Framework version at this step in my tests was:
> .NET Framework 4.5.1 installed with Windows 8.1 or Windows Server 2012 R2
(378675 under the "Release" DWORD registry value)


3. Run the Visual Studio 2017 installer (https://www.visualstudio.com/downloads/)


4. Under the "Workloads" tab, enable the "Mobile development with .NET" item.


5. In the right hand "Summary" list, deselect all of the "Optional" items.


6. Wait for the installation to complete, and reboot as needed.


7. The .NET Framework version at this step is now:
> .NET Framework 4.6.1
(394271 under the "Release" DWORD registry value)




## Side Note: Windows 10 Anniversary Update includes .NET 4.6.2

As per https://msdn.microsoft.com/library/hh925568.aspx
Comment 10 Jose Gallardo 2017-04-18 22:16:04 UTC
This requirement was updated to .NET 4.6.1 in XVS 4.5 (d15-2).
(Commit: 1004007d5eab38b9242591c3939f8ee83e480cb7)
Marking the bug as resolved.

Thanks
Comment 11 Sumanta Welekar 2017-05-11 06:59:39 UTC
Verified on VS2013 and VS2015
please go through gist link for more info
VS 2015 - https://gist.github.com/SumantaWelekar/a41590a145996cc906a97c47eff54a9c
VS 2013
https://gist.github.com/SumantaWelekar/fdbc3c426108d975cfe57d1aee8442de

Logs Attached
Comment 12 Sumanta Welekar 2017-05-11 07:00:08 UTC
Created attachment 22075 [details]
Build and Deployment IDE logs