Dll中的C#Azure功能在Azure中不起作用(但在模拟器中)

Emm*_*RIN 2 c# dll azure csx azure-functions

因为我想在部署之前完全编译Azure功能,并且因为我想在部署之前获得重构(自动重命名)的所有好处,所以我想摆脱Csx文件并使用Dll.

我希望我的所有代码都在.Dll中 - 完全编译.

所以它在本地模拟器中工作正常,但我不能让它在Azure中工作

我总是在日志文件中得到相同的错误消息:

MailSenderFunction: Unable to determine the primary function script.
Try renaming your entry point script to 'run' (or 'index' in the case of     Node),
or alternatively you can specify the name of the entry point script explicitly by adding a 'scriptFile' property to your function metadata.
Run Code Online (Sandbox Code Playgroud)

我没有看到我的功能出现在门户网站的功能应用程序中.

function.json:

{
  "disabled": false,
  "scriptFile": "./bin/MailSenderFunctionLib.dll",
  "entryPoint": "MyCompany.MailSenderFunctionLib.MailSenderFunctionProcessor.RunCsxLess",
  "bindings": [
    {
      ...
    }
  ]
}
Run Code Online (Sandbox Code Playgroud)

Dll代码:

namespace MyCompany.MailSenderFunctionLib
{
  public class MailSenderFunctionProcessor
  {
    public static void RunCsxLess(Mail mail)
    {
      // ...
    }
}
Run Code Online (Sandbox Code Playgroud)

dll位于函数的bin目录中,而不是App Function的bin目录中

任何的想法 ?

Fab*_*nte 7

这将在下一版本的运行时(> 1.0.10690)中得到完全支持.

您可以在此处找到有关该增强功能的更多信息

您在本地运行时观察到不同行为的原因是,此时CLI预览(不幸的是)在托管环境之前并使用新的运行时位.我们正在改变这个过程,以确保这些版本与其他版本保持同步.