Sign Up

Have an account? Sign In Now

Sign In

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Sign InSign Up

Softans

Softans Logo Softans Logo
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
Home/ Questions/Q 3863
In Process
Dravid
Dravid
Asked: November 17, 20222022-11-17T05:46:58+00:00 2022-11-17T05:46:58+00:00

System.IO.FileNotFoundException: Could not load file or assembly ‘Microsoft.Extensions.Options’

I’ve been getting this error message when I try to run my Azure function v4.

System.IO.FileNotFoundException: 'Could not load file or assembly 'Microsoft.Extensions.Options, Version=7.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. The system cannot find the file specified.'

This used to work like a week ago, and now it’s throwing this error at runtime. Latest changes I did was to update EF Core to version 7. But I guess that’s not relevant because that’s in a different project, so not related to the function project.

These are the package references in my function project: PackageRefs

Has anyone else got it or any idea how to resolve it?

Tried removing all the Nuget packages and installing them. That didn’t work. I can see the Microsoft.Extensions.Options.dll (v7) in the debug folder as well. Not sure why the runtime complains about it.

I recently updated to VS 2022 Version 17.4.1. Maybe that’s the issue here?

system.io.filenotfoundexception
  • 0
  • 1 1 Answer
  • 10 Views
  • 0 Followers
  • 0
Answer
Share
  • Facebook
  • Report

1 Answer

  • Voted
  • Oldest
  • Recent
  1. Dravid
    2022-11-17T05:54:01+00:00Added an answer on November 17, 2022 at 5:54 am

    I can see that you have closed this thread but the problem still remains in a scenario where I cannot see that it has been addressed above. I’ve also followed issue #3213 (please do correct me here if I missed the proposed solution for this).

    What is the recommendation for solving the following scenario which generates very much the same type of issue:

    net standard 2.0 class libraries where the following dlls are referenced directly or indirectly

    Microsoft.Extensions.DependencyInjection
    Microsoft.Extensions.DependencyInjection.Abstractions
    Microsoft.Extensions.Logging
    Microsoft.Extensions.Logging.Abstractions
    Microsoft.Extensions.Http

    The problem occurs whith the following combination

    • Referencing any version higher than 3.1.0.0.
    • These net stadnard 2.0 Libraries are referenced in 3rd party application: Python application referencing these libraries, where in this case all related assemblies are added to predefined folder in python project.

    System.IO.FileNotFoundException: Could not load file or assembly ‘Microsoft.Extensions.DependencyInjection.Abstractions, Version=3.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60’ or one of its dependencies.

    Having referenced 3.1.3.0 previously for the class libraries, it now has been downgraded to 3.1.0.0 to make this work. This workaound prevent currently to upgrade libraries to latest and greatest version keeping up with improvements and possibly new features.

    .net core related project, as of my understanding, will automatically be able to reference higher versions wihout a need for bindingRedirect whereas using .net framework bindingRedirect would be needed. Here we have a 3rd party application in Python loading these class libraries and having the version problem on Microsoft.Extensions.DependencyInjection.Abstractions.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

Sidebar

Ask A Question
  • Popular
  • Answers
  • Ghulam Nabi

    Why are the British confused about us calling bread rolls ...

    • 5 Answers
  • Jerry

    Add file to native target programmatically via tuist/XcodeProj

    • 4 Answers
  • Ghulam Nabi

    Is this statement, “i see him last night” can be ...

    • 4 Answers
  • Ghulam Nabi
    Ghulam Nabi added an answer To resolve the NullPointerException, you need to identify the variable… March 15, 2023 at 8:25 am
  • Ghulam Nabi
    Ghulam Nabi added an answer You can replace the PnP code in your Azure Function… February 13, 2023 at 7:11 am
  • Ghulam Nabi
    Ghulam Nabi added an answer You can use the $match stage in the aggregate pipeline… February 10, 2023 at 6:20 am

Trending Tags

android c++ cypress flutter java javascript python selenium testng webdriver

Top Members

Robert

Robert

  • 3 Questions
  • 1k Points
Luci

Luci

  • 5 Questions
  • 1k Points
Kevin O Brien

Kevin O Brien

  • 2 Questions
  • 1k Points

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help

Footer

Softans

Softans is a social questions & Answers Engine which will help you establish your community and connect with other people.

About Us

  • Blog
  • Jobs
  • About Us
  • Meet The Team
  • Contact Us

Legal Stuff

Help

Follow

© 2021 Softans. All Rights Reserved
With Love by Softans.

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.