我試圖在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引用新版本?