Forum Xamarin.Forms

Upgade to Xamarin.Forms3 throws exception Support.Core.UI.26.0.2 not present when 27.0.2 exists

ClintStLaurentClintStLaurent USUniversity ✭✭✭✭✭

Have an existing simple project - 1 view, a couple ViewModels and a few styles.
With XF2.5.blah.blah it builds fine.
I figured it would be a good test subject for upgrading to XF3
There were the typical issues with nugets. Resolved them by clearing the Nuget cache in Visual Studio and nuking the bin and obj directories, then restarting Visual Studio.

One problem remains. Xamarin.Android.Support.Core.UI version 27.0.2 is installed. When I build however VS complains that version 26.0.2 was not found
Really? What the?

Anyone else encounter this when upgrading to XF3?

Best Answer

  • ClintStLaurentClintStLaurent US ✭✭✭✭✭
    Accepted Answer

    Here's something that seems to be successful... This is in a brand-new pristine unaltered "Welcome to Xamarin" solution from VS2017 on an earlier XF3 that still needs an update to latest XF3.
    Using the GUI interface for the nuget package manager couldn't get the job done.
    I opened up the nuget manager console, then gave it the command: install-package xamarin.forms
    That ran, downloaded and installed the latest version just fine.
    Updated all the other packages until nothing needed updating.
    Rebuild solution - Success
    F5 Deploy and debug to physical tablet - Success!!

    Going back to my earlier simple skeleton app that is on XF2.5
    Through the Nuget manager console I installed Xamarin.Forms 3.0.0.485210 to each project one at a time.
    I was then able to use the GUI to select all the other nugets and choose "update all" and it worked.
    I'm distrusting so I closed VS and re-opened it.
    Then re-loaded the solution
    Then rebuilt it - At it works, including all my themeing, styling, binding etc.

    Observation

    Updating Visual Studio 15.7.1 to 15.7.2 reset the default editor choices, so Xamarin XAML tries to open in the WPF visual XAML editor. Had to reset that back to the XML editor.

    Nuget UnifiedMap doesn't init now. I just commented it out until I check on if it has a new initialization mechanism

Answers

  • batmacibatmaci DEMember ✭✭✭✭✭

    Check your android.cs.proj file, you have proabably reference in there somewhere.

  • ClintStLaurentClintStLaurent USUniversity ✭✭✭✭✭

    Thanks #batmaci - I've been digging but its not a reference from me. Its a reference coming from some other package that expect it. One Xamarin.Android.Support.blah.wonk.doohickey has it as an expectation.
    Sometimes dependencies are as bad as the old days of DLL hell.

    This &*^&% of every upgrade needing to make a brand-new solution, then import all your code/files from the old solution to the new solution gets old after a while. But I guarantee that if I made a brand-new "Welcome to Xamarin" from the included templates, updated to 3.0, then brought in all my old code to the new solution it would work. I just shouldn't have to come to that every bloody time Xamarin updates. Not so bad on my little experimental project but it would be a nightmare on a production project. That's why we don't update and that's just wrong.

  • ClintStLaurentClintStLaurent USUniversity ✭✭✭✭✭

    Hmm... Even on a brand-new solution that built with XF3 template, it can't update the minor version update of XF3

    There is a VS2017 update from 15.7.1 to 15.7.2... I wonder if I might get lucky and this issue be resolved with that update. I'm sure I'm not the first person to file feedback for it.

  • JohnHardmanJohnHardman GBUniversity mod
    edited May 2018

    @ClintStLaurent said:
    That's why we don't update and that's just wrong.

    I'm sticking on XF 2.4.x for as long as possible. Have seen too many posts about 2.5.x problems, and too wary to do a major version number upgrade until I really have to. I know that QA is not given enough attention at many companies, but as a customer I've never experienced the consequences as much as when upgrading to a new XF version.

  • ClintStLaurentClintStLaurent USUniversity ✭✭✭✭✭

    @JohnHardman I totally agree. That's why I'm just taking it for a spin in a copy of a simple little solution. I want to get a feel for the pain that would be involved without risking the world.
    Right now it looks like some of the failure it updating could be because it can't even find the nuget online.

    Before I blame Xamarin or Visual Studio I think I'm going to take my PC off the company domain network and tether it to my phone - I'm not 100% sure that our I.T. department isn't filtering.

  • MCvelMCvel USMember ✭✭✭

    I had the same headache this week,

    follow these steps, https://docs.microsoft.com/en-us/xamarin/cross-platform/troubleshooting/questions/nuget-packages-missing

    basically, I had to remove manually from the Android.csproj all the references pointing the old library, I mean ALL references in the file.

    then I had issues with the Xamarin.Forms old reference, did the same,

    then I had issues with googleplayservices packages that I was using in my solution, I uninstall all of them from nuget, and re install them again,

    after that, delete all the Packages folder content (I also clear the nuget cache), delete Android bin and obj folders as well, then cross your fingers and re-build

    I hope this helps, because it was frustrating,

    cheers

  • ClintStLaurentClintStLaurent USUniversity ✭✭✭✭✭
    Accepted Answer

    Here's something that seems to be successful... This is in a brand-new pristine unaltered "Welcome to Xamarin" solution from VS2017 on an earlier XF3 that still needs an update to latest XF3.
    Using the GUI interface for the nuget package manager couldn't get the job done.
    I opened up the nuget manager console, then gave it the command: install-package xamarin.forms
    That ran, downloaded and installed the latest version just fine.
    Updated all the other packages until nothing needed updating.
    Rebuild solution - Success
    F5 Deploy and debug to physical tablet - Success!!

    Going back to my earlier simple skeleton app that is on XF2.5
    Through the Nuget manager console I installed Xamarin.Forms 3.0.0.485210 to each project one at a time.
    I was then able to use the GUI to select all the other nugets and choose "update all" and it worked.
    I'm distrusting so I closed VS and re-opened it.
    Then re-loaded the solution
    Then rebuilt it - At it works, including all my themeing, styling, binding etc.

    Observation

    Updating Visual Studio 15.7.1 to 15.7.2 reset the default editor choices, so Xamarin XAML tries to open in the WPF visual XAML editor. Had to reset that back to the XML editor.

    Nuget UnifiedMap doesn't init now. I just commented it out until I check on if it has a new initialization mechanism

  • batmacibatmaci DEMember ✭✭✭✭✭

    I hear what you are saying. I have exactly similar issue. I wanted to try LiveReload and it failed for me instantly and I was told by xamarin people that because I am still using packages.config. when we started 3-4 years ago, xamarin forms template had this file and now new templates doesnt have when you open a new project. so livereload works for fresh project. it doesnt work as stable as Livexaml and doesnt support 3rd party tools but does something.
    anyhow I tried to migrate and ended up, problem in the link below.
    https://forums.xamarin.com/discussion/127093/packages-config-vs-package-references-and-migrating#latest

    i dig into every single file and references between new project and my existing project but I cant find out what is causing this error. I compared every single line I swear. but fresh project works fine, not exising project

Sign In or Register to comment.