I tried deploying an Azure Web App built against .NET Framework 4.6.2 and it seems to work fine. However, within the same app, if I deploy a web job built against .NET 4.6.2, then it does not work. I get the following error:
[10/06/2016 19:42:25 > b29283: SYS INFO] Status changed to Initializing
[10/06/2016 19:42:27 > b29283: SYS INFO] Run script 'Run.ps1' with script host - 'PowerShellScriptHost'
[10/06/2016 19:42:27 > b29283: SYS INFO] Status changed to Running
[10/06/2016 19:42:31 > b29283: INFO] Web job execution failed. Error code: -2146232576
[10/06/2016 19:42:31 > b29283: SYS INFO] Status changed to Failed
[10/06/2016 19:42:31 > b29283: SYS ERR ] Job failed due to exit code -1
Run.ps1 looks as follows:
[CmdletBinding()]
Param()
& "$PSScriptRoot\ConsoleApplication1.exe"
if ($lastexitcode -ne 0)
{
Write-Output "Web job execution failed. Error code: $lastexitcode"
exit -1
}
ConsoleApplication1.exe just prints a line to console:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello from .NET 4.6.2");
}
}
}
When will the support for .NET framework 4.6.2 be added to Azure web jobs?
I created a console application using .NET Framework v4.6.2 and publish it as WebJob, and same issue appears on my side, the execution fails. So I guess that currently Azure WebJob does not support .NET Framework v4.6.2. As a workaround, you could try to modify <supportedRuntime>
element sku attribute in configuration file.
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6" />
</startup>
Besides, you could give a feedback like this .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.