0

I just updated my VS 2022 to v17.3 and now I get the subject error when compiling a (formally) working iOS app. The error message is:

Error       The "XamarinTelemetry" task failed unexpectedly.
System.IO.FileNotFoundException: Could not load file or assembly 'Newtonsoft.Json,     Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The system cannot find the file specified.
File name: 'Newtonsoft.Json, Version=13.0.0.0, Culture=neutral,   PublicKeyToken=30ad4fe6b2a6aeed'
   at  Microsoft.VisualStudio.Telemetry.TelemetrySessionSettings.GetFaultEventBucketFilterJson(  List`1 bucketFilters)
   at Microsoft.VisualStudio.Telemetry.TelemetrySessionSettings.ToString()
   at Microsoft.VisualStudio.Telemetry.TelemetrySession.SerializeSettings()
   at Xamarin.Common.Tasks.Telemetry.GetSession(IBuildEngine4 buildEngine, String vsTelemetrySession) in D:\a\_work\1\s\src\MSBuild\Xamarin.Common.Tasks\Telemetry.cs:line 62
   at Xamarin.Common.Tasks.XamarinTelemetry.Execute() in D:\a\_work\1\s\src\MSBuild\Xamarin.Common.Tasks\XamarinTelemetry.cs:line 31
   at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
   at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()

I tried installing the latest version of Newtonsoft.Json even though I don't use it, but that didn't work, also tried just referencing the Newtonsoft.Json.dll, still didn't work. Tried cleaning and rebuilding, didn't work. I couldn't find any other suggestions out there, so I'm kinda at a loss as how to proceed. Anyone know whats going on here?

Prescott Chartier
  • 1,519
  • 3
  • 17
  • 34

1 Answers1

0

Per this thread, you can try steps below to resolve the issue.

1.Open, Xamarin.Sdk.targets in Admin Mode (I use, Notepad++)

  • C:\Program Files\Microsoft Visual Studio\2022\Preview\Msbuild\Xamarin\Xamarin.Sdk.targets

2.Comment out the <XamarinTelemetry ... />

3.Save file and rebuild the solution.

Alexandar May - MSFT
  • 6,536
  • 1
  • 8
  • 15