How to debug a project using 'Unmanaged Exports' nuget package

136 views Asked by At

I have an SDK Style .net472 project using unmanagedexports.repack\1.0.4\

The exports work correctly, but whenever I try to attach a debugger, or debug via unittest, Visual Studio will ask me:

Find Source: {projectName}.il

How can I resolve this issue? If I remove the package debugging works again.

1

There are 1 answers

0
Red Riding Hood On

I solved it by

  1. Using DLLExport package instead of UnmanagedExports
  2. Using AnyCPU instead of x86
  3. In DLLExport configuration, select x86+x64
  4. Use the files in the x86 output bin folder

The AnyCpu is required as a workaround for now, as DLLExport will exhibit the same behavior as the original post if just targeting x86, in current version 1.7.4