Ignacio Gómez
Ignacio Gómez

Reputation: 1627

Building errors after updating to Xamarin.Forms 2

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

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

Upvotes: 2

Views: 1015

Answers (2)

Ignacio Gómez
Ignacio Gómez

Reputation: 1627

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".

Upvotes: -1

Adam
Adam

Reputation: 16199

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)

Upvotes: 2

Related Questions