question

AdrianZagar-9942 avatar image
0 Votes"
AdrianZagar-9942 asked JorgeMurilloToala-9443 commented

Visual Studio 2019 16.11.4 crash because Xamarin

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


dotnet-xamarin
image.png (43.6 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

AdrianZagar-9942 avatar image
0 Votes"
AdrianZagar-9942 answered JorgeMurilloToala-9443 commented

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.

· 4
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

I am having the same issue, would you mind telling me which "useless entries" you removed/deleted?

0 Votes 0 ·

Sorry, I just copied all entries in notep and try deleting them in batches. When it worked, I stopped.

0 Votes 0 ·

I'm used the same solution indication but not solve to me. I have to much PATHs and i need know what i can delete. Only Visual Studio related or other java paths?

0 Votes 0 ·
Show more comments
JarvanZhang-MSFT avatar image
0 Votes"
JarvanZhang-MSFT answered JarvanZhang-MSFT edited

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 Docs

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.




image.png (6.6 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.