使用针对 Net Standard 的 DotNet Core 创建的 Azure WebJob 失败并出现错误

Azure WebJob create with DotNet Core targeting Net Standard fails with error

我有一个点网核心控制台应用程序,我想 运行 作为 Azure 中的网络作业。当它尝试执行时,我在日志中看到

错误:未找到依赖项清单中指定的程序集 -- 程序包:'Microsoft.DotNet.InternalAbstractions'、版本:“1.0.0”、路径:'lib/netstandard1.3/Microsoft.DotNet.InternalAbstractions.dll'

我的project.json看起来像这样

{
  "buildOptions": {
    "emitEntryPoint": true,
    "copyToOutput": [ "appsettings.json", "run.cmd" ]
  },
  "dependencies": {
    "Helga.Core": "1.0.0-*",
    "Helga.UpdateParkings": "1.0.0-*",
    "Microsoft.Extensions.Configuration": "1.0.0",
    "Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0",
    "Microsoft.NETCore.App": {
      "type": "platform",
      "version": "1.0.1"
    }
  },
  "frameworks": {
    "netcoreapp1.0": {
      "imports": "dnxcore50"
    }
  },
  "publishOptions": {
    "include": [
      "appsettings.json",
      "run.cmd"
    ]
  },
  "version": "1.0.0-*"
}

但在 project.lock.json 我看到了

  "Microsoft.DotNet.InternalAbstractions/1.0.0": {
    "type": "package",
    "dependencies": {
      "System.AppContext": "4.1.0",
      "System.Collections": "4.0.11",
      "System.IO": "4.1.0",
      "System.IO.FileSystem": "4.0.1",
      "System.Reflection.TypeExtensions": "4.1.0",
      "System.Runtime.Extensions": "4.1.0",
      "System.Runtime.InteropServices": "4.1.0",
      "System.Runtime.InteropServices.RuntimeInformation": "4.0.0"
    },
    "compile": {
      "lib/netstandard1.3/Microsoft.DotNet.InternalAbstractions.dll": {}
    },
    "runtime": {
      "lib/netstandard1.3/Microsoft.DotNet.InternalAbstractions.dll": {}
    }
  },

请指教

我通过压缩 bin/debug 文件夹进行了部署,显然构建引用了已安装的 sdk 等中的程序集

当我将项目发布到文件系统并压缩 PublishOutput 文件夹时,一切都开始工作了,因为所有依赖程序集都被复制到该文件夹​​。