Bug 41099 - Xamarin. UITest does not build on Android
Summary: Xamarin. UITest does not build on Android
Status: RESOLVED ANSWERED
Alias: None
Product: Components
Classification: Xamarin
Component: Xamarin Components ()
Version: N/A
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bill Holmes
URL:
Depends on:
Blocks:
 
Reported: 2016-05-16 09:50 UTC by FieldstrikeMobile
Modified: 2016-05-16 12:06 UTC (History)
2 users (show)

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


Attachments
Repo Case (327.00 KB, application/zip)
2016-05-16 09:50 UTC, FieldstrikeMobile
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 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:
Status:
RESOLVED ANSWERED

Description FieldstrikeMobile 2016-05-16 09:50:13 UTC
Created attachment 16007 [details]
Repo Case

I add the Xamarin.UITest to any android project and I get a build error of the following:

1>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1316,2): error : Exception while loading assemblies: System.IO.FileNotFoundException: Could not load assembly 'System.Runtime.Remoting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. Perhaps it doesn't exist in the Mono for Android profile?
1>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1316,2): error : File name: 'System.Runtime.Remoting.dll'
1>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1316,2): error :    at Xamarin.Android.Tuner.DirectoryAssemblyResolver.Resolve(AssemblyNameReference reference, ReaderParameters parameters)
1>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1316,2): error :    at Xamarin.Android.Tasks.ResolveAssemblies.AddAssemblyReferences(ICollection`1 assemblies, AssemblyDefinition assembly, Boolean topLevel)
1>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1316,2): error :    at Xamarin.Android.Tasks.ResolveAssemblies.Execute()

As you can see the error is:

System.IO.FileNotFoundException: Could not load assembly 'System.Runtime.Remoting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. Perhaps it doesn't exist in the Mono for Android profile?

Sometimes uninstalling and reinstalling Xamarin.Forms works. but as soon as I upgrade UITest it breaks again.

I have attached a repo case. What is causing this? I can't do any UITests on Android
Comment 1 Matt Ward 2016-05-16 12:06:03 UTC
The problem is that Xamarin.UITest targets .NET 4.5 so it should not be used in the Android project. I would uninstall the Xamarin.UITest NuGet package from the Android project.

Xamarin.UITest is designed to be used from a .NET 4.5 project. Both Visual Studio and Xamarin Studio have standalone UITest projects you can add to the solution. There is more information in the following guide:

https://developer.xamarin.com/guides/testcloud/uitest/adding-uitest/