SetValue: Can not convert System.ReadOnlySpan to type 'Xamarin.Forms.Color'

GerryHGerryH USMember ✭✭✭

Getting this weird error(s) after upgrading Visual Studio yesterday:

[0:] SetValue: Can not convert System.ReadOnlySpan`1[[System.Char, mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]] to type 'Xamarin.Forms.Color'

Any idea what that is all about?

thanks

Tagged:

Best Answers

  • GerryHGerryH US ✭✭✭
    Accepted Answer

    Tried updating to Xamarin Forms 3. It failed until I manually removed references to the previous version of Forms from the Android csproj file. Again, this is Enterprise, going to try Prof next.

  • GerryHGerryH US ✭✭✭
    Accepted Answer

    VS Prof: rebuild (fails), then build (success), then run. App runs in Prof now. Programming is fun.

  • GerryHGerryH US ✭✭✭
    Accepted Answer

    You need to upgrade to the latest xamarin forms 3

    Also, you can't trust Build/Clean Solution in VS (I think it is a no-op). I wrote a script like:

    rd /s /q C:\your path goes here\Android\bin
    rd /s /q C:\your path goes here\Android\obj
    rd /s /q C:\your path goes here\SharedMobile\bin
    rd /s /q C:\your path goes here\SharedMobile\obj

Answers

  • GerryHGerryH USMember ✭✭✭

    Upgrade the 3 failed for me the first try, but I will try, try, try again.

    [I have noticed that Visual Studio Enterprise is way smarter at upgrading packages, but only had the trial.]

    thanks,
    will let you know how it goes (tomorrow)

  • GerryHGerryH USMember ✭✭✭
    edited May 2018

    I can use my trial version of Visual Studio Enterprise to run the project okay. Well, after much manual cleaning/rebuilding/rebooting.

    Project does not run in Visual Studio Professional.
    Guess if you want to do Xamarin development, you just got to pay more. A lot more.

  • ClintStLaurentClintStLaurent USUniversity ✭✭✭✭✭

    Glad you're good again. But get out of those emulators as fast as you can. Go down to your cell store or Sams's club etc. and buy a $50 Android tablet... Your phone carrier may just give it to you free if you activate a line of service on it - which you'll want to properly test your app's connectivity and functionality anyway.

    As for everything else... Well, yeah. Welcome to coding and Visual Studio.

  • GerryHGerryH USMember ✭✭✭
    Accepted Answer

    Tried updating to Xamarin Forms 3. It failed until I manually removed references to the previous version of Forms from the Android csproj file. Again, this is Enterprise, going to try Prof next.

  • GerryHGerryH USMember ✭✭✭
    Accepted Answer

    VS Prof: rebuild (fails), then build (success), then run. App runs in Prof now. Programming is fun.

  • GerryHGerryH USMember ✭✭✭

    @ClintStLaurent said:
    Glad you're good again. But get out of those emulators as fast as you can. Go down to your cell store or Sams's club etc. and buy a $50 Android tablet... Your phone carrier may just give it to you free if you activate a line of service on it - which you'll want to properly test your app's connectivity and functionality anyway.

    As for everything else... Well, yeah. Welcome to coding and Visual Studio.

    I have an Android phone I test with. I like the emulator for most testing, runs nice and fast, plus full sized keyboard.

  • ClintStLaurentClintStLaurent USUniversity ✭✭✭✭✭

    @GerryH said:
    I have an Android phone I test with. I like the emulator for most testing, runs nice and fast, plus full sized keyboard.

    I like to use Vyser to remote operate the physical device for the same reason. Its basically like a VNC connection to a remote computer. You get to use your mouse and keyboard to operate a real device, and see the real device on your PC screen, which is great for screenshots etc.
    https://www.vysor.io/

  • abdullahtahan.7433abdullahtahan.7433 SAMember ✭✭

    here i have same issue

  • GerryHGerryH USMember ✭✭✭
    Accepted Answer

    You need to upgrade to the latest xamarin forms 3

    Also, you can't trust Build/Clean Solution in VS (I think it is a no-op). I wrote a script like:

    rd /s /q C:\your path goes here\Android\bin
    rd /s /q C:\your path goes here\Android\obj
    rd /s /q C:\your path goes here\SharedMobile\bin
    rd /s /q C:\your path goes here\SharedMobile\obj

Sign In or Register to comment.