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

Azure Function deployment - Microsoft.Extensions.Configuration.Abstractions - 5.0.0.0 #51

Open
pjjonah66 opened this issue Feb 16, 2022 · 0 comments

Comments

@pjjonah66
Copy link

I hope you can help me with a general query.

The WebAPI works fine for me but I can't get the CleanArchitectureCosmosDB.AzureFunctions to work - either running it locally in the emulator or after deploying it to an Azure function app.

The error is always the same - "Could not load file or assembly 'Microsoft.Extensions.Configuration.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. The system cannot find the file specified.'". This happens where running from VS2019 and VS2022 with no changes to the code or target framework.

Looking at the output window when running the emulator, it's loading up Microsoft.Extensions.Configuration.Abstractions.dll from c:\Users\xxx\AppData\Local\AzureFunctionsTools\Releases\3.30.2\cli_x64. The version in there appears to be 3.1.20.

I've googled this type of error and people advise to downgrade the nuget reference to v3.1.20 (or something similar), but I can't do this for all necessary packages, as when I resolve all dependencies to allow this to work the code starts complaining about the older DLLs as they're not compatible with the correct versions (e.g. Microsoft.EntityFrameworkCore goes too far backwards).

As the code as-is definitely works for you, can you think of anywhere I can look to resolve the dependency problem? I've definitely got the correct SDK somewhere as the WebAPI bin folder has got the correct version of this DLL (File Version 5.0.20.51904).

Thanks for your time!

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

No branches or pull requests

1 participant