2

I just updated to Xamarin.Forms 2 a solution with three projects:

  • Portable library
  • Android project
  • iOS project

I update Xamarin.Forms, Android SDK and I am compiling using the last SDK, which is 23:

enter image description here

When compiling I get tons of errors:

enter image description here

This is how my Nuget looks like:

enter image description here

Any ideas about how to solve this? Really appreciate any help!

Edit Following this post I deleted the folders of "...\Local\Xamarin\" and now I don't have anymore that error. Instead I now have this errors:

enter image description here

edit 2 I uninstalled and installed Xamarin and I'm getting the same error from resource cs file as shown in last picture

Please help

9
  • I would suggest first making sure that you right-click the Xamarin solution and update any and all libraries there. Those Android libraries in the error messages are recent additions to my Xamarin Android project and are libraries that are installed into the Xamarin Android project. Do you see them as updates? Commented Nov 24, 2015 at 19:38
  • I already updated everything, from Nuget and from Android SDK Manager Commented Nov 24, 2015 at 19:39
  • Do you see the following in your Xamarin Android project's references Xamarin.Android.Support.v7.MediaRouter? Commented Nov 24, 2015 at 19:41
  • Yes, I updated my post with an image showing you that Commented Nov 24, 2015 at 19:42
  • Check out the following post for a few answers which include, setting the android target framework to something other than 'Using Latest', and also adding the zip files to where the error message says it wants them: Xamarin Forums Commented Nov 24, 2015 at 19:47

2 Answers 2

2

This is how I resolved it. I'm starting from the beginning even though I know you resolved the first error.

  1. Set your target and compile to specifically API 23 (not really a part of this issue but recommended due to other issues that have popped up in the past)

  2. Go to that directory it mentions, go up a level from content, so you will see the content folder and the android m2repository, then delete it all. Do that for every path it references.

  3. Rebuild and it will redownload and install those files.

VS or Xamarin (not sure which) corrupt those zips on a regular basis. Be prepared to do it again in a few days, weeks or months.

Now go to your Resource.Designer.cs and delete everything inside that file. Normally good to keep it there so your project still references it.

That should finally sort out all of these errors.

** Next step if above fails **

  1. Clean solution
  2. update-package -reinstall (can use -project just for your Android project)
  3. Delete Resource.Designer.cs contents again
  4. Restart Visual Studio
  5. Rebuild once again

You might also want to add sobbing, praying or cursing in with those steps :)

One final thing, if that doesn't work, try the same again but this time uninstalling all NuGet packages and components instead of a reinstall. Then make sure your cache's are clean (C:\Users\\AppData\Local\Xamarin)

Sign up to request clarification or add additional context in comments.

4 Comments

No luck, did every step you tell and the result is the same. Resource.Designer.cs regenerates with the same errors.
Added some more steps I have taken in the past.
Thanks for your help Adam. Finally I installed Windows again
Glad you got it solved. Unfortunate it took a whole Windows reinstall.
-1

This is what I tried, at the end of every step I tested and get the same error results:

  1. Erasing files in "...\Local\Xamarin\" (post)
  2. Deleting Resource.Designer.cs content
  3. Reinstalling Xamarin
  4. Reinstalling Visual Studio (2015 in mi case)

So finally this solve my problem:

  • Reinstalled Windows from scratch Everything works now (without Xamarin.Forms 2)

I will try to update to Xamarin.Forms 2 in a few weeks, but now I need to continue working so I need Xamarin to work, so sadly this was my "workaround".

1 Comment

I solved my problem by first erasing files and then comparing/updating packages and project files manually with xamarin examples that had 2.0 updated.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.