我的Azure函数中的参考c#类库 [英] Reference c# class library in my Azure Function

查看:66
本文介绍了我的Azure函数中的参考c#类库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在Azure Function视觉工作室项目中引用c#类库?

Is it possible to reference a c# class library in an Azure Function visual studio project?

我知道可以引用外部库和Nuget包. 目前,我正在使用

I am aware of the possibilities to reference external libraries and Nuget packages. Currently I am using shared .csx files as described here. These .csx files now contain a copy of my DTO's which are also used in the Service Agents which I use to consume the functions.

理想情况下,我想在Visual Studio中将从Function的引用添加到类库项目中,并且Visual Studio将此dll添加到bin文件夹中.

Ideally I want to add a reference in Visual Studio from a Function to a class library project and that Visual Studio is adding this dll to the bin folder.

推荐答案

当前不支持项目引用,但是您可以将项目的输出(生成的程序集和可能的依赖项)复制到函数根目录下的文件夹中,然后您可以使用上面提到的外部库支持(例如#r "..\myassemblyfolder\MyAssembly.dll")

Currently, project references are not supported, but you can have the output of your project (the resulting assembly and possible dependencies) copied onto a folder under your function's root, which you can then leverage using the external libraries support you've mentioned above (e.g. #r "..\myassemblyfolder\MyAssembly.dll")

如果可能的话,我建议在该功能请求中打开一个问题,并在存储库.这样,其他人就可以对这些请求进行投票,并帮助团队确定这项工作的优先级.

If possible, I'd suggest opening an issue with that feature request, sharing more about your scenario on this repository. This allows other people to upvote those requests and helps the team prioritize this work.

这篇关于我的Azure函数中的参考c#类库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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