发布多个Azure功能而不会覆盖彼此的dll [英] Publish multiple Azure functions without overwriting each other's dll's

查看:49
本文介绍了发布多个Azure功能而不会覆盖彼此的dll的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在3种不同的解决方案中使用.NET Core 3.1具有3种Azure功能.每个解决方案都有一个带有自己的 host.json ,启动和功能触发文件的项目,并且还包含几个基于NETStandard库的相关项目.

I have 3 Azure functions using .NET Core 3.1 in 3 different solutions. Each solution has a project with its own host.json, Startup and function trigger file and also contains several dependent projects based on NETStandard Library.

我将所有3个功能发布到一个AppService.当我这样做时,我可以看到在Kudu中仅创建了1个host.json和1个bin文件夹.我强迫所有3个host.json文件都相同并且具有所有依赖关系,但是问题是/bin文件夹中相同dll文件的dll版本被上次发布的功能覆盖.

I am publishing all the 3 functions to one AppService. When I do this, I can see that in Kudu, there is only 1 host.json and 1 bin folder created. I am forcing all 3 host.json files to be same and has all dependencies but the problem is that the version of dll's for the same dll file in the /bin folder are getting overwritten by the last published function.

我是否可以针对每个功能在/home/site/wwwroot/处使用单独的/bin文件夹?

Is there a way for me to have separate /bin folder at /home/site/wwwroot/ for each function?

推荐答案

我认为您对azure函数应用程序和触发器的理解存在问题.

I think there is something wrong with your understanding of azure function app and triggers.

基本上,每次部署天蓝色功能应用程序时都部署天蓝色功能.所以这就是为什么它被覆盖的原因.

When you deploy azure functions, basicaly every time it is deploy azure function app. So this is why it overwritten.

您应该在函数应用中创建函数(例如,如果您使用的是Vistual Studio):

如果将功能核心工具与其他开发工具一起使用,则:

创建功能应用程序:

func init

创建新函数(触发):

func new

这篇关于发布多个Azure功能而不会覆盖彼此的dll的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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