我试图在Windows机器上使用Visual Studio 2015远程调试Raspberry Pi 3(运行Raspbian Jessie)上的C#.NET 4.5 WinForms应用程序。如何使用Visual Studio 2015远程调试Raspberry Pi 3上的C#.NET 4.5 WinForms应用程序?
据我所知,我可以使用MonoRemoteDebugger这个。我安装了Visual Studio扩展并在Pi上运行服务器程序,但是当我尝试调试应用程序时,MonoRemoteDebugger.Server.exe程序显示来自pdb2mdb.exe程序的错误。以下是错误:
Fatal error: Microsoft.Cci.Pdb.PdbDebugException: Unknown custom metadata item kind: 6 at Microsoft.Cci.Pdb.PdbFunction.ReadCustomMetadata (Microsoft.Cci.Pdb.BitAccess bits) [0x00000] in :0
at Microsoft.Cci.Pdb.PdbFunction..ctor (System.String module, ManProcSym proc, Microsoft.Cci.Pdb.BitAccess bits) [0x00000] in :0 at Microsoft.Cci.Pdb.PdbFunction.LoadManagedFunctions (System.String module, Microsoft.Cci.Pdb.BitAccess bits, UInt32 limit, Boolean readStrings) [0x00000] in :0 at Microsoft.Cci.Pdb.PdbFile.LoadFuncsFromDbiModule (Microsoft.Cci.Pdb.BitAccess bits, Microsoft.Cci.Pdb.DbiModuleInfo info, Microsoft.Cci.Pdb.IntHashTable names, System.Collections.ArrayList funcList, Boolean readStrings, Microsoft.Cci.Pdb.MsfDirectory dir, System.Collections.Generic.Dictionary`2 nameIndex, Microsoft.Cci.Pdb.PdbReader reader) [0x00000] in :0 at Microsoft.Cci.Pdb.PdbFile.LoadFunctions (System.IO.Stream read, Microsoft.Cci.Pdb.BitAccess bits, Boolean readAllStrings) [0x00000] in :0 at Microsoft.Cci.Pdb.PdbFile.LoadFunctions (System.IO.Stream read, Boolean readAllStrings) [0x00000] in :0 at Pdb2Mdb.Driver.Convert (Mono.Cecil.AssemblyDefinition assembly, System.IO.Stream pdb, Mono.CompilerServices.SymbolWriter.MonoSymbolWriter mdb) [0x00000] in :0
我试着运行在郫县命令“pdb2mdb MyProgram.exe”,所以它看来,问题出在pdb2mdb.exe程序它产生同样的错误。随着一些挖掘,我发现这似乎是Mono.Cecil中的一个bug,它在版本0.9.6中为was fixed,但它似乎是可用于Raspian Jessie的最新版本是0.9.5。
我试着只是the one from here更换pdb2mdb.exe,然后将错误更改为:
Unhandled Exception: System.TypeLoadException: Could not load type 'Mono.Cecil.AssemblyDefinition' from assembly 'pdb2mdb, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. [ERROR] FATAL UNHANDLED EXCEPTION: System.TypeLoadException: Could not load type 'Mono.Cecil.AssemblyDefinition' from assembly 'pdb2mdb, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'.
是试图得到淠较新版本Mono.Cecil能解决?如果是这样,我该怎么做,以及确保pdb2mdb.exe引用新版本?