Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

xamarin: Failed to resolve assembly: System.Security

When I try to deploy the iOS application I get the following error: error MT2002: Failed to resolve assembly: 'System.Security, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'

The project has no other references than those that come in the HelloWorld app (monotouch, System, System.Core and System.Xml)

The build is always successful.

How do I solve this?

like image 599
user701700 Avatar asked Nov 01 '22 03:11

user701700


1 Answers

System.Security.dll is not an assembly that Xamarin.iOS ships. The version number is not correct either. This generally happens when adding a reference to code that was not built with Xamarin.iOS assemblies (or PCL).

IOW your application must be using something else (beside monotouch, System, System.Core and System.Xml_ or one of your references is not the assemblies that Xamarin.iOS ships (e.g. an assembly that comes from MS .NET).

How do I solve this?

Review all your assemblies reference and make sure they are all coming from Xamarin.iOS shipped assemblies.

like image 145
poupou Avatar answered Nov 15 '22 04:11

poupou