Bug 54993 - Xamarin versions installed by latest Visual Studio for Mac Preview are incompatible with the default Stable Xamarin version installed by Visual Studio on Windows
Summary: Xamarin versions installed by latest Visual Studio for Mac Preview are incomp...
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Updater ()
Version: 7.0 (VSforMac)
Hardware: PC Mac OS
: --- major
Target Milestone: 15.2
Assignee: Bugzilla
Depends on:
Blocks: 54978
  Show dependency tree
Reported: 2017-04-11 03:33 UTC by Brendan Zagaeski (Xamarin Team, assistant)
Modified: 2017-05-22 23:32 UTC (History)
1 user (show)

Tags: 15.1R
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 Brendan Zagaeski (Xamarin Team, assistant) 2017-04-11 03:33:44 UTC
Xamarin versions installed by latest Visual Studio for Mac Preview are incompatible with the default Stable Xamarin version installed by Visual Studio on Windows

This is a bug to track the on-going compatibility story between the default Xamarin versions installed by Visual Studio for Mac Preview and the default Stable Xamarin versions installed by Visual Studio 2017 and Visual Studio 2015 on Windows.  At the time of filing, the Xamarin.iOS Alpha version installed by Visual Studio for Mac Preview 6 is _not_ compatible with the current Stable XamarinVS (part of the Xamarin 15.1 release [1]) on Windows.

The most visible current symptom of this problem is the error "The root assembly ... conflicts with another assembly" when building Xamarin.iOS projects.

## Recommended resolution in production environments: downgrade to the Xamarin Stable channel on the Mac using Xamarin Studio

1. Open "Xamarin Studio" on the Mac.

2. Navigate to "Xamarin Studio > Check for Updates".

3. Select "Update channel > Stable" in the dialog.

4. Click the "Switch channel" button.

5. Proceed to download and install the Stable products.

Note: Visual Studio for Mac Preview 6 will not be able to run in this configuration because it requires the Mono 5.0 Alpha version.

### "Experimental" option to re-enable VS for Mac Preview 6

After downgrading, install just the Mono 5.0 Alpha version (as listed on http://www.mono-project.com/download/alpha/) alongside the Stable versions of the other products:


## Alternate "experimental" resolution: downgrade _just_ Xamarin.iOS to the current Stable version on the Mac

1. Run the latest VS for Mac Preview installer [1], or install all of the updates that are available on the Alpha channel in VS for Mac Preview.

[1] https://www.visualstudio.com/vs/visual-studio-mac/

2. Install the following package on the Mac to downgrade just Xamarin.iOS to the current Stable channel version:


(This package can also be found on the Xamarin account downloads page as described on [2].)
[2] https://kb.xamarin.com/customer/portal/articles/1699777

3. Visual Studio for Mac Preview will continue to show the available update for Xamarin.iOS  Be sure _not_ to run the "Install Update" action in the updater dialog to avoid re-upgrading that package.
Comment 1 Brendan Zagaeski (Xamarin Team, assistant) 2017-04-11 03:38:06 UTC
## Steps to demonstrate the current incompatibility

1. Install Xamarin through Visual Studio on a system that did not previously have Xamarin installed.  Or ensure Xamarin is up-to-date on the latest Stable version in Visual Studio 2015.  Or ensure that Visual Studio 2017 is updated to the latest available version 15.1 (26403.03) [1] via "Tools > Extensions and Updates".

[1] https://www.visualstudio.com/en-us/news/releasenotes/vs2017-relnotes

2. Install Visual Studio for Mac Preview 6 ( either via the installer [2] or via "Visual Studio > Check for Updates" in an existing installation.

[2] https://www.visualstudio.com/vs/visual-studio-mac/

3. Allow Visual Studio for Mac Preview 6 to install the latest updates from "Visual Studio > Check for Updates".

(As of VS for Mac Preview 6, this menu only includes the "Alpha" channel, which currently contains the 15.2 Preview version of Xamarin.iOS: Xamarin.iOS 10.10.)

4. Create a new "Visual C# > iOS > iPhone > Single View App (iPhone)" project in Visual Studio on Windows.

5. Attempt to build the project in the "Debug|iPhoneSimulator" configuration.

## Results

The build fails as step 5 due to an incompatibility between Xamarin 15.1 Stable (XamarinVS and the Xamarin.iOS 15.2 Alpha Preview (Xamarin.iOS 10.10.0):

The root assembly /Users/macuser/Library/Caches/Xamarin/mtbs/builds/SingleViewIphone1/5c6e4fb0c5dfb58092c84989c08d5d52/bin/iPhoneSimulator/Debug/SingleViewIphone1.exe conflicts with another assembly (/Users/macuser/Library/Caches/Xamarin/mtbs/builds/SingleViewIphone1/5c6e4fb0c5dfb58092c84989c08d5d52/bin/iPhoneSimulator/Debug/SingleViewIphone1.exe).
Comment 2 Brendan Zagaeski (Xamarin Team, assistant) 2017-04-11 03:47:12 UTC Comment hidden (obsolete)
Comment 4 Brendan Zagaeski (Xamarin Team, assistant) 2017-04-12 04:07:24 UTC
## Alternate resolution for VS 2015 and VS 2013 user: update to the 15.2 Alpha versions for Xamarin on Windows

The new Xamarin.VisualStudio 4.5.0 Alpha version that has been published today [1] includes compatibility with the Xamarin.iOS 10.10.0 Alpha version on Mac.  Of course, please note that both packages are Alpha versions and so might contain other issues that have not yet been resolved.

Also, as mentioned in the corresponding Release Blog post [1]:

> This [Alpha] release is not yet available in Visual Studio 2017. This
> post will be updated within the next day with the steps to try this
> release in Visual Studio 2017. If you use Xamarin.iOS in Visual Studio
> 2017, be sure to wait for those steps before installing these preview
> versions on the Mac.
[1] https://releases.xamarin.com/alpha-release-15-2-alpha-preview-2/

I will update this bug again when the installation steps for Visual Studio 2017 have been published.
Comment 7 Brendan Zagaeski (Xamarin Team, assistant) 2017-05-04 20:22:51 UTC
## Update: Alternate resolution now also available for VS 2017 by installing a Visual Studio Preview instance

As of the April 20 (26419.01 – Preview) version, Visual Studio 2017 Preview [1] now includes the Xamarin.VisualStudio extension version 4.5.0 that is compatible with the Xamarin.iOS 10.10.0 Mac version.

Visual Studio 2017 Preview can be installed as a separate instance alongside the non-preview instance of Visual Studio 2017.  That side-by-side Preview instance will be compatible with the default Xamarin.iOS 10.10.0 Alpha/Beta version that Visual Studio for Mac installs.

[1] https://www.visualstudio.com/vs/preview/
Comment 9 Brendan Zagaeski (Xamarin Team, assistant) 2017-05-22 23:02:28 UTC
## Bookkeeping note: Update for the general availability of Visual Studio for Mac on May 10

Visual Studio for Mac now offers all 3 updater channels, so users can now follow the normal steps to keep the Xamarin versions on their Windows and Mac computers in sync.

For any users still seeing the "The root assembly ... conflicts with another assembly" error, first double-check that your Windows and Mac computers are in sync with one the channels from https://developer.xamarin.com/releases/current/, and then be sure to clean the solution.

If the "The root assembly ... conflicts with another assembly" error persists even when the Windows and Mac computers are on matching versions, please file a new bug report, being sure to include the complete version information from both computers, and being sure to mention whether the issue affects all projects (such as new template projects) or only certain existing projects.  Thanks!