I have upgraded Visual studio 2022 to the latest updated release 17.7.4 from the previous build. From then, I'm getting an error "Internal error in Visualizer" when trying to visualize a C# DataTable during debugging. Simple Text Visualizer is working fine, but not Data Visualizer.
I tried repairing visual studio and restarted the system. Still the issue exists.
This is the error message when I click on View. It says 'Microsoft.VisualStudio.NewtonsoftSerializationHelper.dll' is missing.
---------------------------
Internal error in Visualizer
---------------------------
The Visualizer encountered an internal exception and must be closed.
Original type: System.IO.FileNotFoundException
Message: Could not load file or assembly 'file:///C:\Users\<USERNAME>\AppData\Local\assembly\dl3\G8ZYLRAT.R1O\AZG23WDE.2NW\16b08eda\Newtonsoft.Json\net4.5\Microsoft.VisualStudio.NewtonsoftSerializationHelper.dll' or one of its dependencies. The system cannot find the file specified.
Stack trace:
at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark)
at System.Reflection.Assembly.LoadFrom(String assemblyFile)
at Microsoft.VisualStudio.DebuggerVisualizers.NewtonsoftJsonSerializarionUtilities.InitializeSerializationDelegates()
at Microsoft.VisualStudio.DebuggerVisualizers.NewtonsoftJsonSerializarionUtilities.GetDeserializableObject(Stream serializationStream)
at Microsoft.VisualStudio.DebuggerVisualizers.VisualizerObjectSource.GetDeserializableObject(Stream serializationStream)
at Microsoft.VisualStudio.Debugger.DataSetVisualizer.DataSetVisualizerSource.TransferData(Object obj, Stream fromVisualizer, Stream toVisualizer)
at Microsoft.VisualStudio.DebuggerVisualizers.DebuggeeSide.Impl.ClrCustomVisualizerDebuggeeHost.TransferData(Object visualizedObject, Byte[] uiSideData)
---------------------------
OK
---------------------------