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

  • Question

  • User292885 posted

    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

    Tuesday, May 8, 2018 8:27 PM

Answers

  • User180523 posted

    Someone else had an goofy error they posted, after upgrading. Then they upgraded to XamForms 3 and said it went away. Not so sure that's a viable route for everyone. But you can make a copy of your solution directory then try it.

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Tuesday, May 8, 2018 8:36 PM
  • User292885 posted

    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.

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Wednesday, May 9, 2018 3:55 PM
  • User292885 posted

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

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Wednesday, May 9, 2018 4:00 PM
  • User292885 posted

    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

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Tuesday, May 15, 2018 3:30 PM

All replies

  • User180523 posted

    Someone else had an goofy error they posted, after upgrading. Then they upgraded to XamForms 3 and said it went away. Not so sure that's a viable route for everyone. But you can make a copy of your solution directory then try it.

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Tuesday, May 8, 2018 8:36 PM
  • User292885 posted

    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)

    Tuesday, May 8, 2018 9:52 PM
  • User292885 posted

    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.

    Wednesday, May 9, 2018 3:12 PM
  • User180523 posted

    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.

    Wednesday, May 9, 2018 3:23 PM
  • User292885 posted

    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.

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Wednesday, May 9, 2018 3:55 PM
  • User292885 posted

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

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Wednesday, May 9, 2018 4:00 PM
  • User292885 posted

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

    Wednesday, May 9, 2018 4:02 PM
  • User180523 posted

    @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/

    Wednesday, May 9, 2018 5:49 PM
  • User217165 posted

    here i have same issue

    Sunday, May 13, 2018 10:35 AM
  • User292885 posted

    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

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Tuesday, May 15, 2018 3:30 PM