How to fix Failed to attach to process: Unknown Error: 0x80131c3c Error?

Andy VanDamia 0 Reputation points
2024-08-15T14:59:49.9933333+00:00

With VS2022 (Version 17.10.6) am not able to SSH attach to a .net Self-Contained console app running on a Linux-arm64 RaspberryPi 4 without getting the error:

“Failed to attach to process: Unknown Error: 0x80131c3c”

Notes:

a) Using PW SSH connection and VS2022 Debug-Attach option sees the app process without issue and I can click on the process to “attach” but then I get the error

b) I see issues like this on the internet but there is no useful data to help resolve

c) The app runs fine when I run it on the Ras-Pi but now I need to add new code that can only be debugged on the Ras-Pi so I need to get the SSH debug to work

Visual Studio Debugging
Visual Studio Debugging
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Debugging: The act or process of detecting, locating, and correcting logical or syntactical errors in a program or malfunctions in hardware. In hardware contexts, the term troubleshoot is the term more frequently used, especially if the problem is major.
999 questions
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Bruce (SqlWork.com) 65,661 Reputation points
    2024-08-15T17:43:53.7733333+00:00
    0 comments No comments

  2. Andy VanDamia 0 Reputation points
    2024-08-16T15:56:53.2866667+00:00

    Have already tried all suggestions in the suggested link. Also getting the same exact error message using VS Code. Not sure what the error message means but possibly that would help shed light on what is going on??

    0 comments No comments

  3. Andy VanDamia 0 Reputation points
    2024-08-18T22:14:19.11+00:00

    After trying everything I could think of and could not get past this error trying to debug the app with VS2022 or VS Code, I changed the publishing settings to publish a Self-Contained app but did NOT check the "Product Single File" option (which produces may files so not sure why this is when selecting Self-Contained - it appears to be a framework app??) and I was able to get VS2022 debugger to attach to the process and am able to successfully SSH debug the Linux arm64 application running on the Ras-Pi using the VS2022 debugger. The “Failed to attach to process: Unknown Error: 0x80131c3c” error occurs if the published output is a self-contained "single file" regardless of whether the .net Runtime has been or has not been installed on the target Ras-Pi - (trying to debug with either VS2022 or VS Code). I was also able to debug the app as a framework app using VS Code. I am now able to debug but if anyone could provide information as to why the "Self-Contained, Single-File" mode gives the error, please let me know given that it is supposed to work according to the MSFT docs and videos I have seen. Thank you very much.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.