函数V2:Nuget包DocumentFormat.OpenXml 2.8.1遇到异常

时间:2018-05-30 17:36:30

标签: azure azure-functions

我正在使用以下内容:

  • VS2017:15.7.1
  • Microsoft.NET.Sdk.Functions:1.0.13
  • 功能环境:V2

我正在安装Nuget包DocumentFormat.OpenXml 2.8.1(https://www.nuget.org/packages/DocumentFormat.OpenXml) 在本地运行该函数工作正常。但是当我将它发布到Azure时,我会得到 Could not load file or assembly 'System.IO.Packaging, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.系统找不到指定的文件。无法加载指定的文件。

有没有人遇到同样的问题?

非常感谢!

1 个答案:

答案 0 :(得分:1)

Unfortunately, this is caused by design for now. See this github discussion.

currently, redirecting/loading custom System.* assemblies is restricted. We do understand this is overly aggressive, and will relax that restriction in future updates, but that is by design with the initial implementation of the new assembly load behavior.

You can use 2.0.11651-alpha on portal until June 13th, after then you may have to suspend this problem until the update releases.

Update-6/13

Runtime 2.0.11857 release is complete on Azure portal. This problem is fixed. But it has not been available in VS. See Release note.

Update-6/28

New version 2.0.11888 has been available to VS.