[英]Support for .NET 4.6.2 in Azure Web Job
I tried deploying an Azure Web App built against .NET Framework 4.6.2 and it seems to work fine. 我尝试部署基于.NET Framework 4.6.2构建的Azure Web App,它似乎运行良好。 However, within the same app, if I deploy a web job built against .NET 4.6.2, then it does not work.
但是,在同一个应用程序中,如果部署基于.NET 4.6.2构建的Web作业,则它将无法正常工作。 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: Run.ps1如下所示:
[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: ConsoleApplication1.exe仅向控制台输出一行:
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? 何时将对.NET Framework 4.6.2的支持添加到Azure Web作业中?
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. 我使用.NET Framework v4.6.2创建了一个控制台应用程序,并将其发布为WebJob,并且出现相同的问题,执行失败。 So I guess that currently Azure WebJob does not support .NET Framework v4.6.2.
所以我想目前Azure WebJob不支持.NET Framework v4.6.2。 As a workaround, you could try to modify
<supportedRuntime>
element sku attribute in configuration file. 解决方法是,您可以尝试在配置文件中修改
<supportedRuntime>
元素 sku属性。
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6" />
</startup>
Besides, you could give a feedback like this . 此外,你可以给像反馈这样 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.