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.

`dotnet test` fails to launch `DumpMinitool*.exe` because it is a DLL - doesn't produce dump for process of different architecture

See original GitHub issue

Describe the bug

Running dotnet test with hang dumps enabled does not create a dump for (child) processes that do not match the current architecture (for example, 64-bit testhost, test launches a 32-bit process).

To Reproduce

On Windows x64:

  1. dotnet new xunit
  2. Add a test that launches a 32-bit process that will stay running:
public void LaunchX86()
    using (Process p = Process.Start(@"C:\Windows\SysWOW64\notepad.exe"))
  1. dotnet test --blame-hang-timeout 10s --diag:log.txt;tracelevel=verbose


Dump to be produced for both testhost and notepad


No dump for notepad

From log.datacollector:

TpTrace Error: 0 : 19220, 12, 2022/05/13, 15:45:21.877, 2157168736492, datacollector.dll, WindowsHangDumper.Dump: Error dumping process 21596 - notepad: System.ComponentModel.Win32Exception (193): An error occurred trying to start process 'C:\Program Files\dotnet\sdk\7.0.100-preview.3.22179.4\Extensions\DumpMinitool.x86.exe' with working directory 'C:\Users\elfung\AppData\Local\Temp\dd4a4675-188b-417e-9a1d-5c4dc0bf6729'. The specified executable is not a valid application for this OS platform.
   at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
   at Microsoft.VisualStudio.TestPlatform.PlatformAbstractions.ProcessHelper.<>c__DisplayClass1_0.<LaunchProcess>g__InitializeAndStart|0()
   at Microsoft.VisualStudio.TestPlatform.PlatformAbstractions.ProcessHelper.LaunchProcess(String processPath, String arguments, String workingDirectory, IDictionary`2 envVariables, Action`2 errorCallback, Action`1 exitCallBack, Action`2 outputCallBack)
   at Microsoft.TestPlatform.Extensions.BlameDataCollector.WindowsHangDumper.CollectDump(Process process, String outputFile, DumpTypeOption type)
   at Microsoft.TestPlatform.Extensions.BlameDataCollector.WindowsHangDumper.Dump(Int32 processId, String outputDirectory, DumpTypeOption type).

Further technical details

.NET SDK (reflecting any global.json):
 Version:   7.0.100-preview.3.22179.4
 Commit:    c48f2c30ee

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.19044
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\7.0.100-preview.3.22179.4\

Apparently the DumpMinitool.x86.exe that is installed is not an executable?

>dumpbin "C:\Program Files\dotnet\sdk\7.0.100-preview.3.22179.4\Extensions\DumpMinitool.x86.exe"
Microsoft (R) COFF/PE Dumper Version 14.33.31424.0
Copyright (C) Microsoft Corporation.  All rights reserved.

Dump of file C:\Program Files\dotnet\sdk\7.0.100-preview.3.22179.4\Extensions\DumpMinitool.x86.exe

File Type: DLL

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

AaronRobinsonMSFTcommented, May 15, 2022

Should this issue be moved into microsoft/vstest?

I believe @elinor-fung considered this but opted to report it here because when pulling down the assets from microsoft/vstest the binary is correct. Mentioned in

nohwndcommented, Jun 16, 2022

Fixed in both net7 and net6.0.400.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Visual Studio unable to run .NET Core tests
This fixed it for me. I don't know why, but the Processor Architecture setting must have been reset when I reinstalled or upgraded...
Read more >
dotnet-dump diagnostic tool - .NET CLI
The dotnet-dump global tool is a way to collect and analyze dumps on Windows, Linux, and macOS without any native debugger involved.
Read more >
Self-Contained Single-File does not produce a single file
I have set it up to publish as a self-contained single-file. However, in the publish directory is the EXE file and four DLLs....
Read more >
Use dump files in the debugger - Visual Studio (Windows)
A dump file is a snapshot that shows the process that was executing and modules that were loaded for an app at a...
Read more >
Capture core crash dumps with createdump tool - ASP.NET ...
In this part, you'll learn how to capture a crash dump file by using createdump, and open the file in lldb to diagnose...
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 Post

No results found

github_iconTop Related Hashnode Post

No results found