Azure / azure-functions-core-tools

Command line tools for Azure Functions
MIT License
1.3k stars 429 forks source link

`func start` using incorrect "load context", not loading Function Extensions. #3528

Open pfesenmeier opened 9 months ago

pfesenmeier commented 9 months ago

dotnet-isolated, net7.0. func version 4.0.5455

when running func start from \bin\Debug\net7.0 it looks in \bin\Debug\net7.0\.azurefunctions. Extensions are loaded correctly.

[2023-11-21T17:46:56.248Z] Extension Bundle not loaded. Loading extensions from C:\Users\..\bin\Debug\net7.0. BundleConfigured: True, PrecompiledFunctionApp: False, LegacyBundle: False, DotnetIsolatedApp: True, isLogicApp: False
[2023-11-21T17:46:56.249Z] Script Startup resetting load context with base path: 'C:\Users\..\bin\Debug\net7.0\.azurefunctions'.
[2023-11-21T17:46:56.251Z] Loading startup extension 'DurableTask'
[2023-11-21T17:46:56.279Z] Loaded extension 'DurableTask' (2.0.0.0)
[2023-11-21T17:46:56.287Z] Loading startup extension 'Startup'
[2023-11-21T17:46:56.290Z] Loaded extension 'Startup' (1.0.0.0)
[2023-11-21T17:46:56.291Z] Loading startup extension 'AzureStorageBlobs'
[2023-11-21T17:46:56.292Z] Loaded extension 'AzureStorageBlobs' (5.2.0.0)
[2023-11-21T17:46:56.293Z] Loading startup extension 'AzureStorageQueues'
[2023-11-21T17:46:56.295Z] Loaded extension 'AzureStorageQueues' (5.1.3.0)

when running func start from root directory, "Startup Script" looks in /bin/output/bin, not /bin/output/.azurefunctions. No extensions are loaded.

[2023-11-21T17:32:48.314Z] Extension Bundle not loaded. Loading extensions from C:\Users\..\bin\output\bin. BundleConfigured: False, PrecompiledFunctionApp: False, LegacyBundle: False, DotnetIsolatedApp: False, isLogicApp: False
[2023-11-21T17:32:48.315Z] Script Startup resetting load context with base path: 'C:\Users\..\bin\output\bin'.

The Package References Microsoft.Azure.Functions.Worker.Extensions.DurableTask Microsoft.Azure.Functions.Worker.Extensions.Storage.Blobs Microsoft.Azure.Functions.Worker.Extensions.Storage.Queues

Are in another project that my azure functions project references.

A workaround is provided by using this undocumented feature.

SamareshSam commented 9 months ago

is this issue resolved?