什么触发 Azure Functions 重新加载引用的程序集? [英] What triggers Azure Functions to reload the referenced assemblies?

查看:14
本文介绍了什么触发 Azure Functions 重新加载引用的程序集?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在引用外部程序集试图解决此处提到的问题:Azure 函数无法加载可移植程序集.但是,通常我的函数似乎没有反映对 functionNamein 程序集所做的更改.我故意引用了错误的程序集,然后重新运行了该函数.我对记录的内容没有任何变化(并且我正在记录异常).

I've been referencing external assemblies trying to work around the issue noted here: Azure Function Cannot Load Portable Assembly. However, often my function does not seem to reflect the changes made to the functionNamein assemblies. I've intentionally referenced the wrong assemblies, and then reran the function. I experience no change to what is logged (and I'm logging exceptions).

如何强制完全重新加载 Azure 函数?我能否以某种方式查看 Azure 函数作为其已加载"程序集的内容?

How do I force a complete reload of the Azure function? Can I somehow see what Azure functions has as its "loaded" assemblies?

推荐答案

如果唯一改变的是实现而不是程序集标识(名称、版本等),您确实会将此行为视为具有一个匹配的身份已经被加载并且会被使用.

If the only thing changing is the implementation and not the assembly identity (name, version, etc.), you'd indeed see this behavior as an assembly with a matching identity would already be loaded and that would be used.

重新启动您的 Function App 站点(在 Function App 设置 > 转到应用服务设置 > 重新启动下)应该会触发主机重新启动,这将强制重新加载所有程序集.

Restarting your Function App site (under Function app settings > Go to app service settings > Restart) should trigger a host restart, which will force all assemblies to be reloaded.

您还可以使用 Kudu (https://yourappname.scm.azurewebsites.net),在 Process Explorer 下,这也会强制主机重启.

You can also Kill the non-scm w3wp.exe process using Kudu (https://yourappname.scm.azurewebsites.net), under Process Explorer, which will also force a host restart.

这篇关于什么触发 Azure Functions 重新加载引用的程序集?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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