SimpleInjector: Microsoft.Bcl.AsyncInterfaces missing for netcoreapp3.1
Version
5.0.0
Expected behavior
No expection.
Actual behavior
Exception thrown:
An unhandled exception of type ‘System.IO.FileNotFoundException’ occurred in repro.dll 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.
To Reproduce
repro.csproj
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="SimpleInjector" Version="5.0.0" />
</ItemGroup>
</Project>
program.cs
namespace repro
{
static class Program
{
static void Main() => LoadSimpleInjector();
static void LoadSimpleInjector() => new SimpleInjector.Container();
}
}
Additional context
For .NET Core apps, IAsyncDisposable is declared in System.Runtime.dll and Microsoft.Bcl.AsyncInterfaces is also not listed as a Nuget package dependency.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 43
@gedeh, the package is now waiting to be indexed by Nuget. Will be available soon.
Approximately 44 days ago.
Hi @gedeh , thank you for reporting this. Something apparently went silently wrong during uploading the packages. Either at my side, or at NuGet’s side. I’ll try to upload the missing packages a.s.a.p.
Follow up: Apparently, binding redirects does not exist on Azure functions! But the solution presented in this article seems to work for me: https://www.thewissen.io/azure-functions-binding-redirects/
Hi Steven,
I will circle around to this in a couple days, by creating a small test app, and see what works or not.
Including what happens when another library is present that is referencing version 1.1+ of Microsoft.BCL.AsyncInterfaces, along with Simple Injector 5.01
As well as revisit using an assembly redirection
Again, where it fails, is after installing the app with Microsoft Visual Studio Package Installer (upon startup), not after F5 build. So will test in that environment, to confirm the behavior in a limited small app.
On another note, you may want to contact the developers of the following libraries, to learn from their approach. All of these use Microsoft.BCL.AsyncInterfaces Ver 1.1.0
Thanks, and will let you know if I find anything of value.