question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot load assembly: Microsoft.Bcl.AsyncInterfaces

See original GitHub issue

I have an app: Blazor+NET Core 3.1=Npgsql EF Core latest. When this code works it generates an exception

x = {“Could not load file or assembly ‘Microsoft.Bcl.AsyncInterfaces, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51’. The system cannot find the file specified.”:"Microsoft.Bcl.AsyncInterfaces, Version=1.0.0.0, Culture=neutral, PublicKeyToke…

public ItemsDTO<Customers> GetCustomersGridRows(Action<IGridColumnCollection<Customers>> columns,
            QueryDictionary<StringValues> query)
        {
            try
            { 
                var context = new PMdbContext(_options);

                //using (var context = new PMdbContext(_options))
                {
                    var repository = new CustomersRepository(context);
                    var server = new GridServer<Customers>(repository.GetAll(), new QueryCollection(query),
                        true, "customersGrid", columns)
                            .Sortable()
                            .WithPaging(10)
                            .Filterable()
                            .WithMultipleFilters()
                            .Groupable(true)
                            .Searchable(true, false, false);

                    // return items to displays
                    var items = server.ItemsToDisplay;

                    // uncomment the following lines are to test null responses
                    //items = null;
                    //items.Items = null;
                    //items.Pager = null;
                    return items;
                }

            }
            catch(Exception x)
            {
         // <-------------!!
            }
            return null;
        }

I have another function where I do not use EF but use direct Npgsql without EF queries to the database it works. What can be the reason?

It seems: Microsoft.EntityFrameworkCore depends on Microsoft.Bcl.AsyncInterfaces. How to fix it?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
AntonTalalaevcommented, Mar 25, 2021

Had the same issue. Solved by upgrading EF to latest ver 5.* Before that my EF ver was 3.* @roji, Thank you for your useful comments

0reactions
rojicommented, Mar 22, 2020

Since Microsoft.Bcl.AsyncInterfaces is a dependency of EF Core 3.x, it should simply get installed by nuget - unless you specified removed it or avoided deploying it, it should simply be there and work.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Could not load file or assembly Microsoft.Bcl.AsyncInterfaces
For me, installing the Microsoft. Bcl. AsyncInterfaces (Nuget package) fixed the issue. This error also happens when you try using Microsoft.
Read more >
Could not load file or assembly 'Microsoft.Bcl.AsyncInterface
error when executing playwright install: Unhandled exception. System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.
Read more >
Could Not load file or assembly Microsoft.Bcl.AsyncInterfaces
In this video, I am going to show you, How to fix that error : Fix : Could Not load file or assembly...
Read more >
Microsoft.Bcl package dependency issue
Hi, I recently came to know that Microsoft.BCL NuGet package is deprecated. We have been using this package as a dependency with other...
Read more >
Issue Microsoft.Bcl.AsyncInterfaces
AsyncInterfaces'. Is there any good way to solve this problem? “Could not load file or assembly 'Microsoft.Bcl.AsyncInterfaces, Version=1.0.0.0 ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found