Xamarin 15.2 - MTOUCH: error MT2001: Could not link assemblies

xamarin
#1

Since the update to Xamarin 15.2 (this last weekend) certain projects started to fail with:

MTOUCH: error MT2001: Could not link assemblies.
0 Likes

Weekly Virtual Machine / Stack updates - 2017.05.20
#2

So far what we know:

Possible solutions

  • “Switching to .Net Runtime 4.8.1 and the project compiles fine.”
  • “We’re we’re using SDK Linking only. Which is the default. Setting the linking option to No Linking, it builds”
0 Likes

#3

Due to the large number of regressions reported in Xamarin 15.2 we decided to roll back the Xamarin Stable stack to last week’s, with Xamarin 15.1 and Mono 4.8.

0 Likes

#4

Hi, when you do that?

0 Likes

#5

We just did @SirAndriy - see

0 Likes

#6

Xamarin post about the reported issues and suggested workarounds:

https://releases.xamarin.com/common-issues-from-the-xamarin-15-2-release-being-tracked-by-the-xamarin-team/

0 Likes

#7

Latest Xamarin update rolled out during the weekend (15.2.2 - Weekly Virtual Machine / Stack updates - 2017.05.27)

If you’d still have the MTOUCH: error MT2001: Could not link assemblies issue the recommended solution is to upgrade the Xamarin.Forms package to the latest version (2.3.4.247).

Related Xamarin issue tracker link: https://bugzilla.xamarin.com/show_bug.cgi?id=56296

0 Likes

#8

One more Xamarin hotfix released - Xamarin.Android 7.3.1.2: Xamarin Stable - 15.2.2 Xamarin.Android 7.3.1.2 hotfix Stack update

0 Likes

#9

In my case, updating Xamarin.Forms to 2.3.4.247 version didn’t work.
Downgrading Mono runtime to 4.8.* fixed linker issue and the project built successfully. The problem is that Bitrise no loner uses this runtime.
I managed to make it work by switching back from csc to mcs compiler and using xbuild instead of msbuild (note that if you use VS for Mac msbuild is enabled by default. Xamarin Studio still uses xbuild but it can be changed in preferences). More details how to do the switch can be found here https://releases.xamarin.com/common-issues-from-the-xamarin-15-2-release-being-tracked-by-the-xamarin-team/

2 Likes

#10

Thanks for the infos @michalmierzynski!

Just a couple of notes:

  • We updated the Xamarin Stable stack to include one more / the latest Xamarin hotfix update: Xamarin Stable - 15.2.2 Xamarin.Android 7.3.1.2 hotfix Stack update
  • The Xamarin steps will soon have an option to select whether you want to build with xbuild or msbuild. For now we’ll keep the default on xbuild as there are still issues reported which don’t happen with xbuild, but you’ll be able to decide which one to use
  • We’ll soon release a new stack with Visual Studio for Mac preinstalled instead of Xamarin Studio. No ETA yet, but we’ll start working on in the next ~2 weeks, and we’ll see how smooth the transition is (e.g. how many steps have to be modified).
0 Likes

#11

@michalmierzynski xamarin-archive 1.4.1 was just released, and the new version now has a tool option where you can set msbuild: https://github.com/bitrise-steplib/steps-xamarin-archive/releases/tag/1.4.1

P.S.: due to caching on bitrise.io it might take some time for the new version to show up. If you use the local workflow editor or set the version in bitrise.yml directly, 1.4.1 is available now. On the website it should be available in ~10-30 mins; if you’d still not see it after that, please reload the page/editor a couple of times to refresh the browser’s cache.

0 Likes

#12

After upgrade Xamarin.Forms packge to 2.3.4.247 I get error “The “DebugType” parameter is not supported by the “XamlCTask” task”.

Here you can read more: https://forums.xamarin.com/discussion/95724/xamarin-forms-2-3-4-247-update-project-wont-build

So, what to do? Is any solution to fix that issue?

0 Likes

#13

This seems to be a project/xamarin issue.

Did you try to build the project on your Mac in the latest Xamarin Studio? Do you get the same error there?

0 Likes

#14

Yes, it’s project issue…

But after upgrade to Xamarin.Forms version=“2.3.5.233-pre1” I start receive old error: “error MT2001: Could not link assemblies”

p.s. in 2.3.5.233-pre1 was fixed issue with “XamlCTask”

p.p.s. issue is only for iOS project and project build without any errors in Mac ( XS(6.3) Mono runtime 5.0.1.1) and in Mobile Center (mobile.azure.com)

0 Likes

#15

Can you please upgrade to the previously mentioned version: 2.3.4.247 ?

The thing is, we don’t customize anything. Xamarin Studio is installed on the VMs using the official installer, and updated every week with the Xamarin Studio built in updater. If there’s anything we can do/fix please let us know!

One more note: the Xamarin Archive step now has support for specifying the build tool; if you use msbuild locally on your Mac instead of xbuild you can now set that on the Step (Xamarin Archive v1.4.1). I think this definitely worth a try.

0 Likes