我正在嘗試將 java.exe 作為 C#-.NET Standard 2.0 項目中的預構建步驟運行。csproj 文件包含以下代碼段:<Target Name="Java" BeforeTargets="Build"> <Exec Command="c:\Windows\System32\java.exe"/></Target>(我簡化了用于測試的命令行。)文件 java.exe 存在于 c:\windows\system32 中,但構建失敗并出現錯誤代碼 9009:c:\Windows\System32\java.exe' is not recognized as an internal or external command,1>operable program or batch file.1>C:\workspace\Test.csproj(21,5): error MSB3073: The command "c:\Windows\System32\java.exe" exited with code 9009.1>Done building project "Test.csproj" -- FAILED.直接從命令行運行 java.exe 可以正常工作。
- 1 回答
- 0 關注
- 131 瀏覽
添加回答
舉報
0/150
提交
取消