# Run Net Tests With Preview Native Libs

> Use when validating managed .NET changes that do not modify whisper.cpp or native runtime build outputs.

- Skill: `tomevault-io/run-net-tests-with-preview-native-libs` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add tomevault-io/run-net-tests-with-preview-native-libs`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tomevault-io/run-net-tests-with-preview-native-libs/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: tomevault-io (https://skillmd.com/u/tomevault-io)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/tomevault-io/run-net-tests-with-preview-native-libs

---


# Run .NET tests with preview native libs

Use this skill when you need to run Whisper.net managed tests and the change does not require rebuilding native runtimes or changing the `whisper.cpp` submodule.

## When to use this

- The task changes managed C# code, tests, docs, samples, or project files only.
- You need native libraries available locally for `dotnet test`.
- You do not need to validate a new `whisper.cpp` revision or native build-system change.

Do not use this shortcut for changes under `whisper.cpp`, native build scripts, runtime package targets, or native binary outputs. In those cases, build the relevant native runtimes instead.

## How the preview package is produced

The `.github/workflows/upload-build-artifacts.yml` workflow:

1. Reads the pinned `whisper.cpp` short commit SHA.
2. Creates a prerelease tag named `preview-nativelibs-<sha>`.
3. Uploads one release asset named `native-runtimes.zip`.
4. Stores the merged native build outputs inside the archive under `runtime-artifacts/`.

Example release:

```text
https://github.com/sandrohanea/whisper.net/releases/tag/preview-nativelibs-f24588a
```

## PowerShell workflow

Run from the repository root:

```powershell
$commit = git rev-parse --short=7 HEAD:whisper.cpp
$tag = "preview-nativelibs-$commit"
gh release download $tag --repo sandrohanea/whisper.net --pattern native-runtimes.zip --clobber
Expand-Archive .\native-runtimes.zip -DestinationPath . -Force
Copy-Item .\runtime-artifacts\* .\runtimes\ -Recurse -Force
Remove-Item .\runtime-artifacts -Recurse -Force
Remove-Item .\native-runtimes.zip
dotnet restore .\Whisper.net.slnx
dotnet build .\Whisper.net.slnx --no-restore -warnaserror
dotnet test .\Whisper.net.slnx --no-build --logger "trx"
```

## Bash workflow

Run from the repository root:

```bash
commit="$(git rev-parse --short=7 HEAD:whisper.cpp)"
tag="preview-nativelibs-$commit"
gh release download "$tag" --repo sandrohanea/whisper.net --pattern native-runtimes.zip --clobber
unzip -o native-runtimes.zip
cp -R runtime-artifacts/* runtimes/
rm -rf runtime-artifacts native-runtimes.zip
dotnet restore ./Whisper.net.slnx
dotnet build ./Whisper.net.slnx --no-restore -warnaserror
dotnet test ./Whisper.net.slnx --no-build --logger "trx"
```

## Test model handling

The preview native libs release contains native runtime artifacts, not necessarily test model files. Do not set `WHISPER_TEST_MODEL_PATH` to `runtimes/` unless the required `ggml-*.bin` model files are present there. Without that variable, the tests download models through the normal test fixture path.

## Repository hygiene

- Treat downloaded native runtimes as local test inputs, not source changes.
- Do not commit copied binaries from `native-runtimes.zip` unless the task explicitly asks to update runtime artifacts.
- Remove temporary `native-runtimes.zip` and `runtime-artifacts/` files after unpacking.

---
> Source: [sandrohanea/whisper.net](https://github.com/sandrohanea/whisper.net) — distributed by [TomeVault](https://tomevault.io).
<!-- tomevault:4.0:skill_md:2026-07-04 -->

