Missing namespaces, methods, and properties after upgrading to 0.10.0
See original GitHub issueI’m attempting to upgrade my project to work with .NET Core, and I make use of Mono.Cecil to detect line numbers of methods. When I reference 0.10.0-beta1-v2 from a netcoreapp1.0 project, a few things I’ve depended on in recent versions disappear. I’m no longer able to say using Mono.Cecil.Rocks;, which keeps me from being able to call GetMethods() on a TypeDefinition. Also, I’ve been making use of Instruction.SequencePoint, which is no longer available.
Is there upgrade advice for these prerelease packages?
This is the code file I’m hoping to upgrade: https://github.com/fixie/fixie/blob/daf79dc7d749db85667732600bad137e05be233c/src/Fixie.Runner/SourceLocationProvider.cs
It’s part of a test framework that needs to report method line numbers to dotnet test.
Here’s the relevant part of project.json I’m experimenting with.
"netcoreapp1.0": {
"dependencies": {
"Microsoft.NETCore.App": {
"version": "1.0.1",
"type": "platform"
},
"Mono.Cecil": "0.10.0-beta1-v2"
}
}
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (3 by maintainers)

Top Related StackOverflow Question
Thanks for the quick response!
Here’s where the pdb is read:
https://github.com/jbevain/cecil/blob/master/symbols/pdb/Mono.Cecil.Pdb/PdbHelper.cs#L25
That could throw an IOException if the file is already opened and locked.
You could try to add code to create a file handle on the pdb yourself before reading with Cecil, and error out if you can’t read it. In that case it would be interesting to determine who owns the lock.