VS2022(nanoFramework)中ESP32刷写成功但设备管理器无法识别问题
Visual Studio 2022中nanoFramework Device Explorer无法识别ESP32,部署时缺失ICSharpCode.Decompiler程序集
我在使用nanoFramework的Visual Studio 2022开发时遇到问题:ESP32自定义开发板无法被Device Explorer识别,但设备本身已成功刷写,通过SerialPort可以正常查看日志,说明设备运行正常。VSCode环境下设备能被识别,应用也能正常部署。
具体情况:
- 使用CH340 COM端口完成设备刷写
- ESP32日志输出正常,设备功能无异常
- 尝试从Visual Studio部署应用时触发以下错误:
1>------ Deploy started: Project: NFApp1, Configuration: Debug Any CPU ------ 1>Could not load file or assembly 'ICSharpCode.Decompiler, Version=8.2.0.7535, Culture=neutral, PublicKeyToken=d4bfe873e7598c49' or one of its dependencies. The system cannot find the file specified. ========== Deploy: 0 succeeded, 1 failed, 0 skipped ========== ========== Deploy completed at 19:35 and took 01,050 seconds ==========
- .NET nanoFramework Extension日志显示未检测到串口设备:
3 [PortTcpIp network watcher started @ Thread 116 [ProcessID: 21692]] 19:34:17.529 [NanoDevices: Serial device enumeration completed. Found 0 devices] 19:34:18.549 [PortSerial device watcher stopped @ Thread 115] 19:34:18.613 [PortSerial device watcher started @ Thread 117 [ProcessID: 21692]] 19:34:18.614 [NanoDevices: Serial device enumeration completed. Found 0 devices] 19:35:24.556 [NanoDevices: device departure COM237] // turn off the port
更新(2024.11.27):
更新后出现Device Explorer框架内容构造失败的错误:
Construction of frame content failed. Frame identifier: ST:0:0:{ccd64499-4029-4b29-9518-00e9b10c876e} Frame caption: Device Explorer Exception details: System.IO.FileNotFoundException: The system cannot find the file specified. (Exception from HRESULT: 0x80070002) at Microsoft.VisualStudio.Shell.Interop.IVsTaskBody.DoWork(IVsTask pTask, UInt32 dwCount, IVsTask[] pParentTasks, Object& pResult) at Microsoft.VisualStudio.Services.VsTask.<>c__DisplayClass89_0.<GetCallbackForMultipleParent>b__0(Task`1[] _) at System.Threading.Tasks.Task`1.InnerInvoke() at System.Threading.Tasks.Task.Execute() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at Microsoft.VisualStudio.Services.VsTask.RethrowException(AggregateException e) at Microsoft.VisualStudio.Services.VsTask.InternalGetResult(Boolean ignoreUIThreadCheck) at Microsoft.VisualStudio.Shell.Interop.IVsTaskBody.DoWork(IVsTask pTask, UInt32 dwCount, IVsTask[] pParentTasks, Object& pResult) at Microsoft.VisualStudio.Services.VsTask.<>c__DisplayClass89_0.<GetCallbackForMultipleParent>b__0(Task`1[] _) at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2.InnerInvoke() at System.Threading.Tasks.Task.Execute() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at Microsoft.VisualStudio.Services.VsTask.RethrowException(AggregateException e) at Microsoft.VisualStudio.Services.VsTask.InternalGetResult(Boolean ignoreUIThreadCheck) at Microsoft.VisualStudio.Shell.Interop.IVsTaskBody.DoWork(IVsTask pTask, UInt32 dwCount, IVsTask[] pParentTasks, Object& pResult) at Microsoft.VisualStudio.Services.VsTask.<>c__DisplayClass89_0.<GetCallbackForMultipleParent>b__0(Task`1[] _) at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2.InnerInvoke() at System.Threading.Tasks.Task.Execute() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at Microsoft.VisualStudio.Services.VsTask.RethrowException(AggregateException e) at Microsoft.VisualStudio.Services.VsTask.InternalGetResult(Boolean ignoreUIThreadCheck) at Microsoft.VisualStudio.Shell.Interop.IVsTaskBody.DoWork(IVsTask pTask, UInt32 dwCount, IVsTask[] pParentTasks, Object& pResult) at Microsoft.VisualStudio.Services.VsTask.<>c__DisplayClass89_0.<GetCallbackForMultipleParent>b__0(Task`1[] _) at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2.InnerInvoke() at System.Threading.Tasks.Task.Execute() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at Microsoft.VisualStudio.Services.VsTask.RethrowException(AggregateException e) at Microsoft.VisualStudio.Services.VsTask.InternalGetResult(Boolean ignoreUIThreadCheck) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at Microsoft.VisualStudio.Services.VsTask.RethrowException(AggregateException e) at Microsoft.VisualStudio.Services.VsTask.InternalGetResult(Boolean ignoreUIThreadCheck) at Microsoft.VisualStudio.Platform.WindowManagement.WindowFrame.<>c__DisplayClass587_0.<<-ctor>b__0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.VisualStudio.Threading.AwaitExtensions.ExecuteContinuationSynchronouslyAwaiter`1.GetResult() at Microsoft.VisualStudio.Threading.AsyncLazy`1.<>c__DisplayClass20_0.<GetValueAsync>b__0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.VisualStudio.Threading.ThreadingTools.<WithCancellationSlow>d__9.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.VisualStudio.Threading.JoinableTask`1.<JoinAsync>g__JoinSlowAsync|7_0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.VisualStudio.Platform.WindowManagement.WindowFrame.<ConstructContent>g__ConstructContentFromPackageAsync|239_1>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.VisualStudio.Platform.WindowManagement.WindowFrame.<>c__DisplayClass239_0.<ConstructContent>b__2>d.MoveNext()
请问这是否和Visual Studio 2022的nanoFramework插件有关?有没有人遇到过相同问题或知道解决办法?
内容的提问来源于stack exchange,提问作者Yaroslav Vorobyov
相关产品推荐
相关产品推荐

