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

问题描述

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

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 functionName\bin 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网站(在功能应用程序设置">转到应用程序服务设置">重新启动"下)将触发主机重新启动,这将强制重新加载所有程序集.

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终止非scm w3wp.exe进程. .net ),也可以强制重新启动主机.

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重新加载引用的程序集?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-16 03:04