question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Missing namespaces, methods, and properties after upgrading to 0.10.0

See original GitHub issue

I’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:closed
  • Created 7 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
plioicommented, Oct 6, 2016

Thanks for the quick response!

0reactions
jbevaincommented, Oct 14, 2016

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I fix a "type or namespace name could not be ...
When building the solution I was getting the same error (type or namespace ' ' could not be found). Below it I saw...
Read more >
Resolve Missing Namespaces in Code Samples
In this case, Visual Studio can help us resolve the missing namespace. When you see the yellow bulb, click CTRL + . to...
Read more >
[MVS2022][Preview][Class][Scope] Incorrect ...
During defining method in .cpp file after providing namespace and a double colon select class name and it won't be inserted. Instead, dark...
Read more >
Namespace UnityEngine.Localization.SmartFormat
This class holds a Default instance of the SmartFormatter. The default instance has all extensions registered. SmartExtensions · SmartFormatter.
Read more >
12 Upgrading to OSM 7.4
Upgrading OSM consists of the following process: Planning the upgrade. Implementing and testing the upgrade on a development system. Preparing to upgrade a ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found