Visual Studio 2019 16.11.4 crash because Xamarin

Adrian Zagar 96 Reputation points
2021-10-06T07:49:12.44+00:00

After updating from 16.11.3 to 16.11.4, every project in Xamarin makes Visual Studio to close. I discovered that even running Visual studio without a project, opening options and clicking Xamarin makes IDE to crash. That's happening even after full uninstall/reinstall VS.

I found in Xamarin log:

Xamarin Information: 0 : Xamarin - 16.11.000.190-d16-11+2391ed9: 10.06.2021 06:27:17Z
DateTime=2021-10-06T06:27:17.0781098Z: 10.06.2021 06:27:17Z
Xamarin Information: 0 : !Xamarin - 16.11.000.190-d16-11+2391ed9: 10.06.2021 06:27:17Z
DateTime=2021-10-06T06:27:17.0781098Z: 10.06.2021 06:27:17Z
Xamarin.VisualStudio.Android.XamarinAndroidPackage Warning: 0 : Initializing Xamarin.VisualStudio.Android.XamarinAndroidPackage: 10.06.2021 06:27:17Z
DateTime=2021-10-06T06:27:17.1201193Z: 10.06.2021 06:27:17Z
Xamarin.VisualStudio.UnhandledExceptionsManager Error: 0 : An unhandled error occurred. Details: Unknown property key for value list directories in which to look for classes!

System.InvalidOperationException: Unknown property key for value list directories in which to look for classes!
at Xamarin.Android.Tools.JdkInfo.<>c__DisplayClass46_0.<GetJavaProperties>b__0(Object o, DataReceivedEventArgs e) in C:\A\1\14\s\External\androidtools\external\xamarin-android-tools\src\Xamarin.Android.Tools.AndroidSdk\JdkInfo.cs:line 263
at System.Diagnostics.Process.ErrorReadNotifyUser(String data)
at System.Diagnostics.AsyncStreamReader.FlushMessageQueue()
at System.Diagnostics.AsyncStreamReader.GetLinesFromStringBuilder()
at System.Diagnostics.AsyncStreamReader.ReadBuffer(IAsyncResult ar)
at System.IO.Stream.ReadWriteTask.InvokeAsyncCallback(Object completedTask)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.IO.Stream.ReadWriteTask.System.Threading.Tasks.ITaskCompletionAction.Invoke(Task completingTask)
at System.Threading.Tasks.Task.FinishContinuations()
at System.Threading.Tasks.Task.FinishStageThree()
at System.Threading.Tasks.Task.FinishStageTwo()
at System.Threading.Tasks.Task.Finish(Boolean bUserDelegateExecuted)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution)
at System.Threading.Tasks.Task.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback(): 10.06.2021 06:27:17Z
DateTime=2021-10-06T06:27:17.5652083Z: 10.06.2021 06:27:17Z

138048-image.png

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,272 questions
0 comments No comments
{count} votes

Accepted answer
  1. Adrian Zagar 96 Reputation points
    2021-10-07T04:01:50.233+00:00

    After half a day with repair, uninstall, reinstall, I ended up by discovering that one of the entries in system PATH variable what to blame. I just delete some apparently useless entries and everything is back to normal.


1 additional answer

Sort by: Most helpful
  1. JarvanZhang 23,931 Reputation points
    2021-10-07T02:08:48.1+00:00

    Hello,​

    Welcome to our Microsoft Q&A platform!

    I discovered that even running Visual studio without a project, opening options and clicking Xamarin makes IDE to crash.

    This seems to be related to the Xamarin sdk. Please open Visual Studio Installer tool to check if the Mobile develop with .NET component has been installed.

    138382-image.png

    If the component is installed, try to repair the VisualStudio to reset the environment.

    If the above still doesn't work, this may be a potential issue with VS. It's suggested to report the issue to the VS product team and then follow them on the developer community site. Please see How to report a problem with Visual Studio - Visual Studio | Microsoft Learn

    Best Regards,

    Jarvan Zhang


    If the response is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments