What triggers Azure Functions to reload the referenced assemblies?(什么触发 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 重新加载引用的程序集?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:什么触发 Azure Functions 重新加载引用的程序集?
基础教程推荐
- 如何激活MC67中的红灯 2022-01-01
- 如何在 IDE 中获取 Xamarin Studio C# 输出? 2022-01-01
- c# Math.Sqrt 实现 2022-01-01
- 将 XML 转换为通用列表 2022-01-01
- 将 Office 安装到 Windows 容器 (servercore:ltsc2019) 失败,错误代码为 17002 2022-01-01
- 有没有办法忽略 2GB 文件上传的 maxRequestLength 限制? 2022-01-01
- SSE 浮点算术是否可重现? 2022-01-01
- rabbitmq 的 REST API 2022-01-01
- MS Visual Studio .NET 的替代品 2022-01-01
- 为什么Flurl.Http DownloadFileAsync/Http客户端GetAsync需要 2022-09-30