Skip to content

How to use ExtCore with Azure Functions? #184

Open

Description

@gpeipman

Hi,

is there any chance to use ExtCore with Azure Functions? If I use services.AddExtCore() in functions startup then all I get back is error: System.IO.FileNotFoundException: 'Could not load file or assembly 'Microsoft.Extensions.DependencyModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. The system cannot find the file specified.'

Activity

  1. Xarkam commented on Nov 18, 2020

    @Xarkam
    Contributor

    Hello @gpeipman, I think it's due to a bad restore on azure.
    Here you can see what package need this dependency https://www.nuget.org/packages/Microsoft.Extensions.DependencyModel/ (section used by)

    Even if you are not using ExtCore, this dependency comes via one of 5 packages including Microsoft.AspNetCore.Mvc.Core

  2. abdusco commented on Nov 18, 2020

    @abdusco

    You might have a mismatch in your framework versions. Make sure you're running the app in dotnet version >= the version you're testing on.

  3. Xarkam commented on Nov 19, 2020

    @Xarkam
    Contributor

    Yes, look your package version and pay attention to the sdk used on azure. The default sdk becomes NET 5. Be sure to specify the maximum sdk 3.1 in your Azure pipeline.

  4. gpeipman commented on Nov 20, 2020

    @gpeipman
    Author

    I got rid of it. There are actually some more issues. ExtCore is trying to log something during Startup. It's not supported by functions Startup as loggers are initialized and configured partially when configuring methods are called. Therefore all logging during Startup crashes. I got rid of it by implementing my own AddExtCore method.

  5. Xarkam commented on Nov 20, 2020

    @Xarkam
    Contributor

    @gpeipman Do you still have logs of this problem that we can analyze?

  6. DmitrySikorsky commented on Nov 22, 2020

    @DmitrySikorsky
    Member

    Hi @gpeipman, thank you for the information. I didn't think about the Azure Functions while ExtCore development. It would be amazing if you find time to write some simple TODO in the docs... And please let me know if I need to add something to the ExtCore to make it easier to have this use case working with no problems.

    BTW, I've released version 6.0.0-beta1, it is based on .NET 5.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions