WhatArch 0.1.19

dotnet tool install --global WhatArch --version 0.1.19
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local WhatArch --version 0.1.19
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=WhatArch&version=0.1.19
                    
nuke :add-package WhatArch --version 0.1.19
                    

WhatArch

WhatArch

A .NET tool for Windows that detects the target architecture of native binaries and .NET assemblies.

CI codecov NuGet NuGet

Features

  • Detects native binary architectures: x86, x64, ARM64, ARM
  • Identifies .NET assembly configurations: AnyCPU (.NET), AnyCPU (.NET - 32-bit preferred), x86 (.NET), x64 (.NET), ARM64 (.NET)
  • Simple, script-friendly output
  • No external dependencies - parses PE headers directly

Requirements

  • Windows (PE files are Windows-specific)
  • .NET 10 SDK

Installation

dotnet tool install --global WhatArch

Update the tool

dotnet tool update --global WhatArch

Usage

whatarch <path-to-binary>

Examples

# Native binaries (by name - searches PATH, adds .exe automatically on Windows)
whatarch notepad
> ARM64

whatarch cmd
> x64

# Native binaries (by path)
whatarch C:\Windows\System32\kernel32.dll
> x64

whatarch C:\Windows\SysWOW64\kernel32.dll
> x86

# .NET assemblies
whatarch MyApp.dll
> AnyCPU (.NET)

whatarch MyApp.x64.dll
> x64 (.NET)

Exit Codes

Code Meaning
0 Success
1 Error (file not found, invalid PE, etc.)

How It Works

WhatArch reads the PE (Portable Executable) file headers to determine the target architecture. For .NET assemblies, it also examines the CLR header and CorFlags to distinguish between AnyCPU and platform-specific builds.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last Updated
0.1.19 110 1/17/2026
0.1.17 101 1/13/2026
0.1.14 104 12/31/2025
0.1.11 97 12/30/2025
0.1.9 97 12/30/2025
0.1.8 96 12/29/2025
0.1.5 102 12/29/2025