【发布时间】:2017-02-15 17:04:36
【问题描述】:
我尝试部署基于 .NET Framework 4.6.2 构建的 Azure Web 应用程序,它似乎工作正常。但是,在同一个应用程序中,如果我部署针对 .NET 4.6.2 构建的 Web 作业,则它不起作用。我收到以下错误:
[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 如下所示:
[CmdletBinding()]
Param()
& "$PSScriptRoot\ConsoleApplication1.exe"
if ($lastexitcode -ne 0)
{
Write-Output "Web job execution failed. Error code: $lastexitcode"
exit -1
}
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");
}
}
}
何时将 .NET 框架 4.6.2 支持添加到 Azure Web 作业?
【问题讨论】:
-
您的意思是在有效的情况下使用较低的 fx 版本吗?可能想在你的问题中解决这个问题。
-
@DavidEbbo 抱歉,没听懂。
-
对不起,是我误读了你的问题:)
标签: .net azure-webjobs azure-web-app-service .net-4.6.2