Errors in Android/iOS after migrating to .NET Standard

Hello,

I had a Xamarin.Forms project for UWP, Android and iOS and I used a shared project (not .NET Standard). I now wanted to switch to .NET Standard and I mostly followed this guide, except I completely created a new Cross-Platform project (with .NET Standard as the sharing technology) and moved the files from my exisiting projects. I did use nugets not targeting .NET Standard and included the PackageTargetFallback just like in the video.

I use Xamarin.Forms 2.5 and .NET Standard 1.6 because I target Windows 10 Mobile and I did use a few interfaces/DependecyService to access special UWP features.

I moved all the appropriate files and checked the namespaces and I am now able to run my UWP app just fine like it was before. Trying to build the Android or iOS app will fail though and I get different errors, in total over 4000. I have installed the nuget packages I had before for Android but there seems to be no difference.

I have searched for some errors but I was not able to find a solution. Does anybody have an idea?

Thank you!

Best Answer

  • kingmatherskingmathers ✭✭
    Accepted Answer

    I acutally solved this problem a few days ago. I tried deleting bin and obj folders and rebuilding but with no success. For me, the solution was to rename the folder which had my solution in it and which had a whitespace to remove that whitespace (used an underscore instead). After that, the errors no longer persisted.

Answers

  • BillyLiuBillyLiu Member, Xamarin Team Xamurai

    @kingmathers
    Have you tried to clean your project and manually delete bin and obj folder, restart VS then rebuild your project?

  • kingmatherskingmathers Member ✭✭
    Accepted Answer

    I acutally solved this problem a few days ago. I tried deleting bin and obj folders and rebuilding but with no success. For me, the solution was to rename the folder which had my solution in it and which had a whitespace to remove that whitespace (used an underscore instead). After that, the errors no longer persisted.

  • BillyLiuBillyLiu Member, Xamarin Team Xamurai

    @kingmathers
    Glad your issue has been resolved. Please help to mark your reply as answer if it’s ok for you, which could also benefit others who encounter similar issues in this community.
    Thanks for your cooperation

Sign In or Register to comment.