5

I am observing something really strange and I cannot get my mind around it.

Initially I was having trouble stepping into a NuGet package that I am the creator of.
I have a package that is targeting two frameworks: net472, and netstandard2.0. The DebugType of the package is "embedded".

After many hours of wrestling with Symbol servers, Source Link, PDB files, C++ build tools, etc, I managed to stumble onto this thread: https://stackoverflow.com/a/50024447/12816285

Following the instructions to Enable native code debugging, it worked! I was able to step-into my own NuGet package from within a Console app targeting net472.

Wait... what? Why! How is my C# class library considered native code?

Follow up question, is there any known bugs in this? I've found that my visual studio freezes/crashes pretty consistently after enabling it.

  • 1
    `I was able to step-into my own NuGet package from within a Console app targeting net472.` - and when you succeeded doing this, what did you see? disassembly, or your C# code? – quetzalcoatl Jan 31 '20 at 13:40
  • 1
    As it is a compiled dll and it isn't from other project you need to disable Just My Code and enable Native code. The text of Native code can be a bit messy. – Oscar Vicente Perez Jan 31 '20 at 13:50
  • 1
    A tip, if you are using two Configurations like Debug and Release, you can add a ProjectReference and a PackageReference with Condition using the Configuration. You should edit .csproj for this. – Oscar Vicente Perez Jan 31 '20 at 13:52
  • @quetzalcoatl Thanks for bringing my attention to this. As I said earlier, I am ingesting my own NuGet package. Looks like it was pulling up the local C# files of that NuGet package from the solution folder locally.... So I guess I have more work ahead of me. – Daniil Demidov Jan 31 '20 at 14:05

0 Answers0