tenho o comando tauri #[tauri::command] fn getexedir(subdir: String) -> PathBuf {…
- User
tenho o comando tauri
#[tauri::command] fn get_exe_dir(subdir: String) -> PathBuf { env::current_exe() .expect("Failed to get current executable path") .parent() .expect("Failed to get executable directory") .to_path_buf().join(subdir) }
no C# eu uso
private async Task GetExeDir(string subdir) { return await JsRuntime.InvokeAsync("TAURI.invoke", "get_exe_dir", new { subdir }); }
Path.Combine(await GetExeDir("patch"))
porem quando passo o subdir recebo erro
crit: Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100] Unhandled exception rendering component: invalid args
subdirfor commandget_exe_dir: command get_exe_dir missing required key subdir Microsoft.JSInterop.JSException: invalid argssubdirfor commandget_exe_dir: command get_exe_dir missing required key subdir at Microsoft.JSInterop.JSRuntime.d__16`1[[System.String, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].MoveNext() at RagnaTales.Pages.app.ProgressBar.GetExeDir() in C:\Users\jonatas\Desktop\Megasantos\RagnaTales\src\Pages\app\ProgressBar.razor:line 37 at RagnaTales.Pages.app.ProgressBar.OnInitializedAsync() in C:\Users\jonatas\Desktop\Megasantos\RagnaTales\src\Pages\app\ProgressBar.razor:line 42 at Microsoft.AspNetCore.Components.ComponentBase.RunInitAndSetParametersAsync() at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState) - Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.