如何使用Azure Function包含和部署运行时依赖项? [英] How to include and deploy run-time dependencies with Azure Function?

查看:74
本文介绍了如何使用Azure Function包含和部署运行时依赖项?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

I've got an Azure Function in which I am attempting to use Oracle's Outside-In document conversion library.

我的Azure函数是通过Visual Studio用C#编写的.我正在使用VS自己的内置发布功能进行部署.我正在使用提供的仿真器进行本地开发.

My Azure Function is written in C# via Visual Studio. I'm deploying using VS' own built-in publish functionality. I'm locally developing using the provided emulators.

Oracle库带有.NET库,我相信它主要只是其转换运行时应用程序"的接口.看起来他们基本上只是将外壳程序封装到一个进行实际转换的子应用程序中.

The Oracle library comes with a .NET library which I believe is mainly just an interface to their "conversion run-time application." It looks like they basically just shell out to a child application which does the actual conversion.

我应该将这些运行时依赖项(oracle exe等)放在哪里,以便它们包含在我发布的Azure函数中?

Where should I put these run-time dependencies (the oracle exe, etc) so that they are included in my published Azure Function?

当前,当我在本地调试时,从oracle .NET库内部收到错误消息,提示它无法找到其所需的转换exe.它正在查看

Currently, when I debug locally I get an error, from within the oracle .NET library, saying that it cannot locate the needed conversion exe of theirs. It's looking in an %AppData% directory - it looks like the install directory of the azure emulator.

推荐答案

对于Azure门户:

For azure portal:

https://docs.microsoft.com /en-us/azure/azure-functions/functions-reference-csharp#referencing-custom-assemblies

对于Visual Studio:

For Visual Studio:

您可以只使用标准的VS机制:添加对外部程序集的引用或添加nuget程序包.

You can just use standard VS mechanisms: add reference to external assembly or add nuget package.

谢谢,阿列克谢


这篇关于如何使用Azure Function包含和部署运行时依赖项?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆