I'm trying to deploy a .NET Core Console App as an Azure WebJob. All files etc. are getting copied to the right directories but my console app its output is a .dll, so it requires dotnet.exe
to start.
I've added a run.cmd file with the single command: dotnet QbiSync.dll
.
But the output is the following, it can't seem to find dotnet.exe:
[11/14/2016 13:15:29 > 4741da: SYS INFO] Run script 'run.cmd' with script host - 'WindowsScriptHost'
[11/14/2016 13:15:29 > 4741da: SYS INFO] Status changed to Running
[11/14/2016 13:15:29 > 4741da: INFO]
[11/14/2016 13:15:29 > 4741da: INFO] D:\local\Temp\jobs\continuous\QbiSync\x4jkoxww.vy4>dotnet QbiSync.dll
[11/14/2016 13:15:29 > 4741da: ERR ] 'dotnet' is not recognized as an internal or external command,
[11/14/2016 13:15:29 > 4741da: ERR ] operable program or batch file.
[11/14/2016 13:15:29 > 4741da: SYS ERR ] Job failed due to exit code 1
[11/14/2016 13:15:29 > 4741da: SYS INFO] Process went down, waiting for 60 seconds
Opening up a Console window using Kudu or in the Azure Portal and calling dotnet.exe
both works fine. I've also tried hardlinks like:
"D:\Program Files (x86)\dotnet\dotnet.exe" QbiSync.dll
"\Program Files (x86)\dotnet\dotnet.exe" QbiSync.dll
But they also give errors like:
[11/14/2016 13:59:29 > 4741da: ERR ] The filename, directory name, or volume label syntax is incorrect.
[11/14/2016 13:59:29 > 4741da: INFO] D:\local\Temp\jobs\continuous\QbiSync\hzlkzj1q.0jt>"D:\Program Files (x86)\dotnet\dotnet.exe" QbiSync.dll
Even though the dotnet.exe is actually located there.
Update:
Possibly related is that the source used @echo off
at the start of the script. But this is also a "command" that doesn't seem to be accepted.
[11/14/2016 12:37:57 > 4741da: INFO] D:\local\Temp\jobs\continuous\QbiSync\3n44nly1.ucq>@echo off
[11/14/2016 12:37:57 > 4741da: INFO]
[11/14/2016 12:37:57 > 4741da: ERR ] '@echo' is not recognized as an internal or external command,
Sources used:
dotnet.exe QbiSync.dll
(without having the dll). It failed withThe application to execute does not exist: 'D:\local\Temp\jobs\continuous\DotNetContJob\tgq45gw1.kb2\QbiSync.dll'
, which means it successfully launched dotnet.exe and only failed because the dll is not there. Can you try this same test to isolate?D:\local\Temp\jobs\continuous\QbiSync\jf0yv53s.i3c>run.cmd
. I'll check your second comment in a few minutes.SYS INFO] Run script 'run.cmd' with script host - 'WindowsScriptHost'
[11/14/2016 15:33:51 > e06c64: SYS INFO] Run script 'run.cmd' with script host - 'WindowsScriptHost' [11/14/2016 15:33:51 > e06c64: SYS INFO] Status changed to Running [11/14/2016 15:33:51 > e06c64: INFO] [11/14/2016 15:33:51 > e06c64: INFO] D:\local\Temp\jobs\continuous\DotNetContJob\vocvjalz.qbl>dotnet.exe QbiSync.dll [11/14/2016 15:33:51 > e06c64: ERR ] The application to execute does not exist: 'D:\local\Temp\jobs\continuous\DotNetContJob\vocvjalz.qbl\QbiSync.dll'