Repository: tauri
Issue: [bug] Windows STATUS_ENTRYPOINT_NOT_FOUND
Labels: type: bug,status: needs triage

### Describe the bug

I have a Tauri app that uses [Tauri Specta](https://github.com/specta-rs/tauri-specta) to generate bindings for my plugins. On Linux and MacOS everything works fine.

But on Windows I cannot generate the bindings as it fails with the following error: (exit code: 0xc0000139, STATUS_ENTRYPOINT_NOT_FOUND)

To be sure that I have an issue with this lib, I cloned the repo and ran its tests, but it failed with the same error (I also tried to run the tests on another Windows machine, and it also failed).

I'm pretty sure it's not an issue with Tauri Specta itself, but I have no clue how to fix this kind of error.

Any help is welcomed !

### Reproduction

Clone the [Tauri Specta](https://github.com/specta-rs/tauri-specta) repository and try to run its tests on a Windows machine.

### Expected behavior

It should raise this error when trying to run the tests: (exit code: 0xc0000139, STATUS_ENTRYPOINT_NOT_FOUND)

### Full `tauri info` output

```text
[✔] Environment
    - OS: Windows 10.0.19045 x86_64 (X64)
    ✔ WebView2: 128.0.2739.79
    ✔ MSVC: Visual Studio Build Tools 2022
    ✔ rustc: 1.81.0 (eeb90cda1 2024-09-04)
    ✔ cargo: 1.81.0 (2dbb1af80 2024-08-20)
    ✔ rustup: 1.27.1 (54dd3d00f 2024-04-24)
    ✔ Rust toolchain: stable-x86_64-pc-windows-msvc (default)
    - node: 20.17.0
    - yarn: 4.5.0
    - npm: 10.8.2

[-] Packages
    - tauri 🦀: 2.0.0-rc.10
    - tauri-build 🦀: 2.0.0-rc.9
    - wry 🦀: 0.43.1
    - tao 🦀: 0.30.0
    - @tauri-apps/api : not installed!
    - @tauri-apps/cli : 2.0.0-rc.15

[-] Plugins
    - tauri-plugin-os 🦀: 2.0.0-beta.9
    - @tauri-apps/plugin-os : not installed!

[-] App
    - build-type: bundle
    - CSP: unset
    - frontendDist: ../dist
    - devUrl: http://localhost:1420/
    - framework: React (Next.js)
    - bundler: Vite
```


### Stack trace

```text
$ RUST_BACKTRACE=1 cargo test --all --all-features
warning: use of deprecated function `deprecated`: This is a deprecated function
   --> examples\app\src-tauri\src/main.rs:126:13
    |
126 |             deprecated,
    |             ^^^^^^^^^^
    |
    = note: `#[warn(deprecated)]` on by default

warning: use of deprecated function `deprecated`: This is a deprecated function
   --> examples\app\src-tauri\src/main.rs:126:13
    |
126 |             deprecated,
    |             ^^^^^^^^^^

warning: field `0` is never read
   --> examples\app\src-tauri\src/main.rs:111:19
    |
111 | pub struct Custom(String);
    |            ------ ^^^^^^
    |            |
    |            field in this struct
    |
    = help: consider removing this field
    = note: `#[warn(dead_code)]` on by default

warning: field `a` is never read
   --> examples\app\src-tauri\src/main.rs:115:5
    |
114 | pub struct Testing {
    |            ------- field in this struct
115 |     a: String,
    |     ^

warning: `tauri-specta-example-app` (bin "tauri-specta-example-app" test) generated 4 warnings
    Finished `test` profile [unoptimized + debuginfo] target(s) in 0.50s
     Running unittests src\lib.rs (target\debug\deps\tauri_plugin_specta_example-b9e9267bbe2d2bf0.exe)
error: test failed, to rerun pass `-p tauri-plugin-specta-example --lib`

Caused by:
  process didn't exit successfully: `C:\Users\***\tauri-specta\target\debug\deps\tauri_plugin_specta_example-b9e9267bbe2d2bf0.exe` (exit code: 0xc0000139, STATUS_ENTRYPOINT_NOT_FOUND)
note: test exited abnormally; to see the full output pass --nocapture to the harness.
```


### Additional context

_No response_