VS 15.3: Dynamic keyword throws PlatformNotSupportedException - Workaround?

Yesterday I happily updated to Visual Studio 15.3. After launching my Android app it crashed with a PlatformNotSupportedException at a line which is using the dynamic keyword.

Searching the bugreports I found this:
https://bugzilla.xamarin.com/show_bug.cgi?id=58625 "Android Dynamic Type Platform not supported exception"
It says "Version: 7.5 (15.4)" which reads to me "wait for 15.4 release".

Since yesterday I try to work around this breaking change but failed.

Is there any workaround known (installing a lower version (HOW?),...), as this bug was created a week ago?

The only workaround I found is: Installing 15.2 and NOT try to update (which is hard, as the version I have had the other serious "obj/XYZ.dll is locked"-bug sigh...)

Best Answer

Answers

  • kspearrinkspearrin USMember ✭✭

    I am also experiencing this now that I am on VS 15.3

  • @DavidOrtinau
    Is this issue on your radar? When can we expect an update fixing this?

  • DavidOrtinauDavidOrtinau USForum Administrator, Xamarin Team, Insider, University Xamurai

    It's on my radar now! :smile:

    Looks like this is an Android issue to be resolved there, so I've pinged @CodyB to investigate.

  • CodyBCodyB USXamarin Team Xamurai

    Hey everyone! I am discussing this issue with the rest of the Android team at this time. I have confirmed that it is fixed within the 15.4 branch. Whether or not this is an issue we can get resolved on 15.3 remains to be seen.

    I am looking into the options for everyone impacted, and I will update this thread with information as available.

  • VeYroNVeYroN PTMember ✭✭

    Well, this is not an android issue. It also happens on iOS...

    Is there any workaround?

    Thanks!

  • CodyBCodyB USXamarin Team Xamurai

    @VeYroN The root of the issue is in Mono, so it appears to impact each platform. Still researching our options here :)

  • VeYroNVeYroN PTMember ✭✭
    edited August 2017

    @CodyB So, for now maybe we should downgrade de mono version?

  • VeYroNVeYroN PTMember ✭✭
    edited August 2017

    So, it does not work...

    Could not launch Visual Studio
    This application requires a newer version (5.2.0.138+) of the Mono framework.
    Please download and install the latest version of Mono.

  • VeYroNVeYroN PTMember ✭✭

    Any way to download the previous version os VS (compatible with mono v5.0.1.1)?

  • @ClintStLaurent I just tried it again - and it worked!

    My setup:
    Visual Studio 15.2 (Xamarin.VisualStudio 4.5.0.486)
    Device: Android 6
    Wifi enabled (important!)
  • CodyBCodyB USXamarin Team Xamurai

    @VeYroN seems like you are on macOS, is that correct?

  • VeYroNVeYroN PTMember ✭✭
    @CodyB yes :)
  • VeYroNVeYroN PTMember ✭✭
    @CodyB any updates on this?
  • VeYroNVeYroN PTMember ✭✭

    So, for everyone in here, what I did to keep working was go to my backups, restore the old version of visual studio (v. 7.0) download xamarin.ios 10.10.0.36 and xamarin.android 7.3.1...

  • @DavidOrtinau
    I think Xamarin should provide the links to the vsix-Setup-Files required to install a previous version of the needed Visual Studio extensions.

    On https://store.xamarin.com/account/my/subscription/downloads you can only download setup files for VS 2013/2015, which are not helpful. I had to search google for a specific release and luckily found one in a error report(!) of the setup posted on the internet.

    https://store.xamarin.com/account/my/subscription/downloads should be updated to point to the required VS 2017 extension files.

    Related:
    Microsoft should also provide a way to download a specific VS 2017 version including all dependencies at a given time. As I said, fortunately I had an old offline image of 15.2, but with a buggy Xamarin.VisualStudio.vsix version.
    For rollback-scenarios the lack of that is utterly painful.

  • JamesCroftJamesCroft GBMember

    Just saw this issue appear after updating VS. First thought was to come here to see if there was a similar issue being seen.

    Hope there is a fix for this very soon.

  • CodyBCodyB USXamarin Team Xamurai

    For Mac users, you can download the previous versions from https://store.xamarin.com/account/my/subscription/downloads as a means of downgrading.

    I am looking into what options we have for Windows users.

    Thanks!

  • RSHRSH USUniversity ✭✭

    I am having this problem too on iOS and Android :(. Oh the time I spent thinking it was my code...

  • @CodyB Thanks
  • RSHRSH USUniversity ✭✭

    Also now on iOS if I have my build set to Link SDK, it fails on the build and spits this out:
    1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(748,3): error : Unexpected error - Please file a bug report at http://bugzilla.xamarin.com
    1> System.NullReferenceException: Object reference not set to an instance of an object
    1> at MonoTouch.Tuner.Linker.Process (MonoTouch.Tuner.LinkerOptions options, MonoTouch.Tuner.MonoTouchLinkContext& context, System.Collections.Generic.List1[Mono.Cecil.AssemblyDefinition]& assemblies) [0x00145] in /Users/builder/data/lanes/4991/4a279c9a/source/xamarin-macios/tools/mtouch/Tuning.cs:94 1> at Xamarin.Bundler.Target.LinkAssemblies (System.Collections.Generic.List1[Mono.Cecil.AssemblyDefinition]& assemblies, System.String output_dir, System.Collections.Generic.IEnumerable1[T] sharedCodeTargets) [0x0029a] in /Users/builder/data/lanes/4991/4a279c9a/source/xamarin-macios/tools/mtouch/Target.cs:491 1> at Xamarin.Bundler.Target.ManagedLink () [0x005c5] in /Users/builder/data/lanes/4991/4a279c9a/source/xamarin-macios/tools/mtouch/Target.cs:614 1> at Xamarin.Bundler.Target.ProcessAssemblies () [0x000bb] in /Users/builder/data/lanes/4991/4a279c9a/source/xamarin-macios/tools/mtouch/Target.cs:800 1> at Xamarin.Bundler.Application.ProcessAssemblies () [0x0002f] in /Users/builder/data/lanes/4991/4a279c9a/source/xamarin-macios/tools/mtouch/Application.cs:1396 1> at Xamarin.Bundler.Application.BuildManaged () [0x00001] in /Users/builder/data/lanes/4991/4a279c9a/source/xamarin-macios/tools/mtouch/Application.cs:827 1> at Xamarin.Bundler.Application+<>c.<BuildAll>b__134_1 (Xamarin.Bundler.Application v) [0x00000] in /Users/builder/data/lanes/4991/4a279c9a/source/xamarin-macios/tools/mtouch/Application.cs:775 1> at System.Collections.Generic.List1[T].ForEach (System.Action`1[T] action) [0x00024] in :0
    1> at Xamarin.Bundler.Application.BuildAll () [0x00050] in /Users/builder/data/lanes/4991/4a279c9a/source/xamarin-macios/tools/mtouch/Application.cs:775
    1> at Xamarin.Bundler.Driver.Main2 (System.String[] args) [0x00481] in /Users/builder/data/lanes/4991/4a279c9a/source/xamarin-macios/tools/mtouch/mtouch.cs:1420
    1> at Xamarin.Bundler.Driver.Main (System.String[] args) [0x0000f] in /Users/builder/data/lanes/4991/4a279c9a/source/xamarin-macios/tools/mtouch/mtouch.cs:945

  • CodyBCodyB USXamarin Team Xamurai

    Hey friends! We are working on a fix option for this issue. I will update when I have more information :smile:

  • T-PT-P USMember ✭✭

    Could this issue be related to the one discussed here: https://stackoverflow.com/questions/45753852/ef-core-queries-throw-exceptions-since-vs2017-15-3 ?
    A quick fix would be really appreciated, the problem is blocking ongoing development

  • MD5590MD5590 USMember ✭✭

    Same here.
    What to do now (Windows)? Uninstall and reinstall older Version of VS?

  • MarkoLazicMarkoLazic USMember ✭✭

    Same here. Using dynamic keyword in Xamarin Forms PCL project throws PlatformNotSupportedException exception in runtime. Verified on Android platform.
    It started happening after updating to Visual Studio 15.3.

  • VeYroNVeYroN PTMember ✭✭

    The only solution i found until now is reinstall an older version of visual studio...

  • CodyBCodyB USXamarin Team Xamurai

    Hey everyone,

    I just wanted to let you all know that a Service Release intended to fix this issue is slated to be released shortly. I will update this thread again when the update is released.

    Thanks!

  • @CodyB Thanks! This update fixes this problem!

    PS: After the setup I had a load of error alerts when opening a solution each one saying another package failed to load. All projects were unloaded, but another trip to Visual Studio Installer fixed it. Maybe because I had installed 2017 various times before...

  • VeYroNVeYroN PTMember ✭✭
    edited August 2017

    @CodyB, @David.Rettenbacher Where can we get that Service Release?

  • @VeYroN Just run the VS Installer and hit Update.
  • VeYroNVeYroN PTMember ✭✭

    @David.Rettenbacher thanks! From the stable channel?

  • David.RettenbacherDavid.Rettenbacher ATMember ✭✭
    edited August 2017
    @VeYroN Yes, stable channel
  • VeYroNVeYroN PTMember ✭✭

    Ok @David.Rettenbacher thanks!

  • MarkoLazicMarkoLazic USMember ✭✭

    I confirm that update to Visual Studio 15.3.2 fixes the issue.

  • VeYroNVeYroN PTMember ✭✭

    Working!

Sign In or Register to comment.