You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Smeantic-Kernal NuGets fail in Function Apps #1793
Describe the bug
If you use Azure Function Apps with version 15.230531.5-preview it will work.
Every version past that gives the error in the screenshot. 0.15.320609.2-preview and onward.
To Reproduce
Just make an Azure Function App in Visual Studio 2022 as a httptrigger and import these files. After you run it, you will see the error.
Expected behavior
Needs to be able to load latest versions.
Screenshots
Desktop (please complete the following information):
In descriptions already, on windows 11
I believe this is the problem in the patch notes:
Upgrade System.Text.Json and Microsoft.Extensions.Logging versions to 7.0 by Stephen Toub (@stephentoub) in #1297
cc Fabio Cavalcante (@fabiocav)
AzureFunctions has a managed host and loads functions into the same process -- as a result the host will pin a number of the assemblies it uses since it needs to share types from those assemblies with functions and agree on the type definitions. As a result - those functions cannot upgrade the assemblies pinned by the host. It looks like Azure functions doesn't do anything to notify the function project when it's in a state where it's referenced versions of these that cannot be loaded by the host.
Here's a repro project for the broken in-process azure function: FunctionApp1.zip
Azure functions did create a solution for this problem, and that's the "Isolated" function model. When you create your function, make sure to select "Isolated" as shown below.
Here's a repro project for the working isolated process azure function: FunctionApp2.zip
Fabio Cavalcante (@fabiocav) it would be nice if Azure Functions SDK would notify users when they were in this state - either with a better runtime exception - or even better - a build time error letting them know the application was referencing an assembly version that wouldn't be loadable in the shared host.
Activity
wrharper-AASP commentedon Jun 30, 2023
I believe this is the problem in the patch notes:
Upgrade System.Text.Json and Microsoft.Extensions.Logging versions to 7.0 by Stephen Toub (@stephentoub) in #1297
wrharper-AASP commentedon Jun 30, 2023
I reverted changes (manually created a build) the best I could from: bc7627a until this is resolved.
ericstj commentedon Jun 30, 2023
cc Fabio Cavalcante (@fabiocav)
AzureFunctions has a managed host and loads functions into the same process -- as a result the host will pin a number of the assemblies it uses since it needs to share types from those assemblies with functions and agree on the type definitions. As a result - those functions cannot upgrade the assemblies pinned by the host. It looks like Azure functions doesn't do anything to notify the function project when it's in a state where it's referenced versions of these that cannot be loaded by the host.
Here's a repro project for the broken in-process azure function:
FunctionApp1.zip
Azure functions did create a solution for this problem, and that's the "Isolated" function model. When you create your function, make sure to select "Isolated" as shown below.

Here's a repro project for the working isolated process azure function:
FunctionApp2.zip
Here's more detail on the different types of Azure functions: https://learn.microsoft.com/en-us/azure/azure-functions/dotnet-isolated-process-guide
Fabio Cavalcante (@fabiocav) it would be nice if Azure Functions SDK would notify users when they were in this state - either with a better runtime exception - or even better - a build time error letting them know the application was referencing an assembly version that wouldn't be loadable in the shared host.
wrharper-AASP commentedon Jun 30, 2023
I guess the only choice is to wait for in-process to get fixed. Isolated won't work for what I am doing.
wrharper-AASP commentedon Jun 30, 2023
the custom build I have created is working. so I will just use it until in-process is fixed.
Downgrade several 7.0.* packages to 6.0.* (#1799)
Downgrade several 7.0.* packages to 6.0.* (microsoft#1799)
.Net: SK Telemetry improvements (#1905)
Downgrade several 7.0.* packages to 6.0.* (microsoft#1799)
Downgrade several 7.0.* packages to 6.0.* (microsoft#1799)