Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Microsoft.Extensions.Configuration deployment error #183

Merged
merged 1 commit into from
Apr 14, 2023
Merged

Conversation

jaredpar
Copy link
Owner

The function app was failing with the error

Could not load file or assembly 'Microsoft.Extensions.Configuration, Version=7.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'

This is true even though that DLL at that version was deployed with the function. The reason is that the function runtime is on .NET 6.0 and it loads several dependencies before it loads the function code. Anything loaded by the function runtime can't be overridden by the function app. In this case MS.E.Configuration was one of those extensions. More simply it was a mistake to use 7.0.0 here on a .NET 6 runtime, should've kept it at 6.0.1 from the start.

The function app was failing with the error

> Could not load file or assembly 'Microsoft.Extensions.Configuration, Version=7.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'

This is true even though that DLL at that version was deployed with the function. The reason is that the function runtime is on .NET 6.0 and it loads several dependencies before it loads the function code. Anything loaded by the function runtime can't be overridden by the function app. In this case MS.E.Configuration was one of those extensions. More simply it was a mistake to use 7.0.0 here on a .NET 6 runtime, should've kept it at 6.0.1 from the start.
@jaredpar jaredpar enabled auto-merge (squash) April 14, 2023 04:18
@jaredpar jaredpar merged commit 2c36259 into main Apr 14, 2023
@jaredpar jaredpar deleted the version branch April 14, 2023 04:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant