What you are experiencing is the expected behavior, although not ideal. This is a mistake in the portal.
Function runtime directly consumes metadata in binaries of precompiled functions. Here is an example annotation for the disable feature.
[TimerTrigger("0 */5 * * * *"), Disable()]
This is a .json function created by visual studio over annotations.
{ "generatedBy": "Microsoft.NET.Sdk.Functions.MSBuild-1.0.2", "configurationSource": "attributes", "bindings": [ { "type": "timerTrigger", "schedule": "0 */5 * * * *", "useMonitor": true, "runOnStartup": false, "name": "myTimer" } ], "disabled": true, "scriptFile": "..\\bin\\FunctionApp3.dll", "entryPoint": "FunctionApp3.Function1.Run" }
The .json function generated by the precompiled functions is consumed by the portal, and this is what the portal shows. When you change the disabled state of a function in the portal, the disabled property changes in the .json function, but it is not consumed by the runtime function. Therefore, it continues to be executed.
When you deploy it in a disconnected state, the runtime is aware of this and evaluates it as expected.
I discovered this error to fix the portal. https://github.com/Azure/azure-functions-ux/issues/1857
source share