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: