Open Barafu opened 1 year ago
Could you post the full error? the extension does check if tauri-cli is installed before trying to use it
OK, so the steps are: On a new machine (I used Windows Sandbox on Win 11) install Rust, with dependencies, VSCode. Then do cargo install create-tauri-app
, then cargo create-tauri-app
. Choose cargo package manager and no frameworks. Open the folder in VSCode. It suggests Tauri extension and rust-analyzer. Install both. Restart VSCode.
Run command: Tauri: Dev
. It produces an error popup: "Couldn't detect package manager for current project.". Press hotkey for build task: "could not find Cargo.toml
in C:\test\testrr
or any parent directory". Then close VSCode and open src-tauri
folder in it. Run Tauri: Dev. It reports "Tauri project not found".
Took me some time to understand that I missed cargo install tauri-cli
.
cargo create-tauri-app
prints the instructions to install needed prerequisites including tauri-cli if you choose cargo
as the package manager.
I will see if we can improve the errors a bit to direct you in the correct directions.
If tauri-cli is not installed, trying to run the Build and Dev actions display very misleading error about cargo.toml file missing. Either the extension needs to check for this, or at least add a reminder to install tauri-cli in the extension description. VSCode recommends this extension when opening a tauri project, so you may assume that some users are building tauri app for the first time.