我已将Visual studio 2022从以前的版本升级到最新的更新版本17.7.4。从那时起,在调试期间尝试可视化C# DataTable时,我收到错误“Visualizer中的内部错误”。简单文本Visualizer工作正常,但Data Visualizer不正常。
我尝试修复Visual Studio并重新启动系统。问题仍然存在。
这是我单击“视图”时出现的错误消息。它显示缺少“Microsoft.VisualStudio.NewtonsoftSerializationHelper.dll”。
---------------------------
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>AppDataLocalassemblydl3G8ZYLRAT.R1OAZG23WDE.2NW16b08edaNewtonsoft.Json
et4.5Microsoft.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
---------------------------