我尝试部署一个针对.NET框架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 -1Run.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");
}
}
}何时向Azure web作业添加对.NET框架4.6.2的支持?
https://stackoverflow.com/questions/39904680
复制相似问题