In other VS 2015 C# project types the Property Page for the project contains a checkbox under the Debug tab which enables native debugging. I cannot see this in an Asp.Net Core project and am therefore unable to step into a C++ Dll dependency which I have the code for.
Asked
Active
Viewed 1,382 times
0
-
Do you make sure that you could add this dll as a reference in your app? NET Core projects only support referencing .NET framework assemblies. https://stackoverflow.com/questions/37398128/reference-a-full-framework-library-project-from-asp-net-core-mvc-web-application – Jack Zhai Aug 02 '16 at 11:28
-
Even i am facing this problem. I have opened a stackover flow question. here is the link : http://stackoverflow.com/questions/38700702/c-cmanaged2unamangedvisual-studio-2015-update-2-netcore-console-app-1-0 – Prashanth Rao K Aug 03 '16 at 06:38
-
Jack Zhai - If the issue was references, it would not work at all, which it does. pinvoke finds the native dll and uses it. The issue is debugging both managed and unmanaged code through VS. See my response to your answer below. – PatMac Aug 04 '16 at 17:14
1 Answers
0
It would have a limitation for native debugging directly.
Reference: No native code debugging in CoreCLR console application projects in VS2015?
One workaround is that using the "Attach to process".
-
If I attach to a coreclr process I cannot choose both Managed (CoreCLR) Code and Native Code. If I try this, I get the following error: 'Unable to attach to the process. Interop debugging is not supported.' I can attach to either managed or native and step into that code, but not both. On the other hand, if I build to net461, I can step into both. This is the workaround I am using for now. – PatMac Aug 04 '16 at 17:14
-
"Interop debugging is not supported" means you cannot debug both managed and native code types at the same time. If the above reply is helpful for you, accept it as the answer. Thanks. – Jack Zhai Aug 05 '16 at 02:46
-
@JackZhai-MSFT - And yet for YEARS we could do exactly that using the full framework. Another huge step backwards IMHO... – David V. Corbin Jun 14 '22 at 11:42