I am trying to build the Xamarin IOS app from visual studio windows to an iPhone 9.
I get the following errors.


Can someone please about this?
I am trying to build the Xamarin IOS app from visual studio windows to an iPhone 9.
I get the following errors.


Can someone please about this?
Hi SrinathMannam-4826,
Welcome to our Microsoft Q&A platform!
For the first error, there is no "ToHexString" method in NSData class. You can convert NSData to hexstring as follows.
string ToHexString(NSData data)
{
byte[] by = data.ToArray();
StringBuilder hex = new StringBuilder(by.Length * 2);
foreach (byte b in by)
hex.AppendFormat("{0:x2}", b);
return hex.ToString();
}
For the error "CS0246", please check if you have add the right reference and using it in your code. More info you can refer to Compiler Error CS0246.
As to the error "CS0234", similarly, you need to check if the namesapce has the correct references. For more info, refer to Compiler Error CS0234.
To handle the error in the second image, you can try to clean the project and clear the related cache on Mac under the path ~/Library/Caches/Xamarin/mtbs.
Regards,
Kyle
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
Yes, for the first image the errors caused because some files were not included, So I need to add them and then the errors are gone.
For the second image. It seems there is an ongoing issue at https://developercommunity.visualstudio.com/t/Xamarin-Forms-iOS-SkiaSharp-DirectoryNot/1424416 and The workaround mentioned by Ian Martin works for me.
The solution is to downgrade SkiaSharp, SkiaSharp.Views, SkiaSharp.Views.Forms (to version 2.80.1) and include them in head project as well as the IOS project
7 people are following this question.