5

I'm trying to write a IL Weaver with Mono.Cecil, and for it to remain debugable in VS2010, I need the PdbReaderProvider class, or some similar implementation of ISymbolProvider. I've downloaded the latest Mono dlls from http://mono.ximian.com/daily/, but in the zip there is no Mono.Cecil.Pdb.dll. I've downloaded the source code from https://github.com/jbevain/cecil/tree/master/Mono.Cecil but I can't seem to be able to get that particular project compile under .net 4.
Could somebody help me out and point to a compiled working .net dll of Mono.Cecil.Pdb, preferably with a working PdbReaderProvider inside?

TDaver
  • 7,164
  • 5
  • 47
  • 94

2 Answers2

6

Indeed, you need to get the source from Cecil's github repository. Then you just have to open Mono.Cecil.sln inside VS 2010, select the solution configuration net_4_0_Debug (or net_4_0_Release) and build the solution. The solution is self contained so you don't need anything else.

You'll get both Mono.Cecil.dll and Mono.Cecil.Pdb.dll inside bin/net_4_0_Debug (or bin/net_4_0_Release).

Jb Evain
  • 17,319
  • 2
  • 67
  • 67
  • I'm getting "Error 1 Cryptographic failure while signing assembly '\jbevain-cecil-e8e6138\obj\net_4_0_Release\Mono.Cecil.dll' -- 'Error signing assembly -- Access is denied. ' Mono.Cecil" – TDaver Jan 20 '11 at 08:27
  • There's clearly an issue with how you got the sources or with you file permissions if you can't read the mono.snk file at the root of the repository or if the compiler can't sign Mono.Cecil.dll with it. – Jb Evain Jan 20 '11 at 08:45
  • I've downloaded it from the same link you gave, unzipped into my documents/projects folder, opened the sln in visual studio and pressed rebuild. The snk file is in the root folder, next to the sln file. I don't know what can I be possibly doing wrong in all this... – TDaver Jan 20 '11 at 09:12
  • You must have a file permission issue somewhere. – Jb Evain Jan 20 '11 at 09:56
  • Anyway, your original question is about the location of Mono.Cecil and Mono.Cecil.Pdb. This has been answered. Please join the mono-cecil group for further assistance to build Cecil, SO isn't really the appropriate medium for this. – Jb Evain Jan 20 '11 at 09:58
  • Tried it on an other computer, I didn't see 'net_4_0_Debug' configuration, just simple 'Debug', I built it, and now it works like a charm :) Thanks. – TDaver Jan 21 '11 at 09:44
2

Alternatively, get the NuGet package which includes all Cecil assemblies. If you're on the MS stack, of course.

skrebbel
  • 9,841
  • 6
  • 35
  • 34