Method 'Rent' in type 'System.Buffers.MemoryPool' from assembly 'System.IO.Pipelines, Version=0.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' does not have an implementation.
See original GitHub issueSteps to reproduce
I was troubleshooting my friend’s code, I was using 2.1.300-preview2-008375, he was using 2.1.400-preview-008659. We both did a fresh clone, built, tried to run, he got the following error (I did not):
warn: Microsoft.AspNetCore.Server.Kestrel[0] Unable to bind to http://localhost:5000 on the IPv6 loopback interface: ‘Method ‘Rent’ in type ‘System.Buffers.MemoryPool’ from assembly ‘System.IO.Pipelines, Version=0.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60’ does not have an implementation.’. crit: Microsoft.AspNetCore.Server.Kestrel[0] Unable to start Kestrel. System.IO.IOException: Failed to bind to address http://localhost:5000. —> System.AggregateException: One or more errors occurred. (Method ‘Rent’ in type ‘System.Buffers.MemoryPool’ from assembly ‘System.IO.Pipelines, Version=0.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60’ does not have an implementation.) (Method ‘Rent’ in type ‘System.Buffers.MemoryPool’ from assembly ‘System.IO.Pipelines, Version=0.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60’ does not have an implementation.) —> System.TypeLoadException: Method ‘Rent’ in type ‘System.Buffers.MemoryPool’ from assembly ‘System.IO.Pipelines, Version=0.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60’ does not have an implementation. at Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.LibuvThread…ctor(LibuvTransport transport) at Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.LibuvTransport.BindAsync() at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServer.<>c__DisplayClass22_0
1.<<StartAsync>g__OnBind|0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindEndpointAsync(ListenOptions endpoint, AddressBindContext context) at Microsoft.AspNetCore.Server.Kestrel.Core.LocalhostListenOptions.BindAsync(AddressBindContext context) --- End of inner exception stack trace --- --- End of inner exception stack trace --- at Microsoft.AspNetCore.Server.Kestrel.Core.LocalhostListenOptions.BindAsync(AddressBindContext context) at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.AddressesStrategy.BindAsync(AddressBindContext context) at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindAsync(IServerAddressesFeature addresses, KestrelServerOptions serverOptions, ILogger logger, Func
2 createBinding) at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServer.StartAsync[TContext](IHttpApplication`1 application, CancellationToken cancellationToken)Unhandled Exception: System.IO.IOException: Failed to bind to address http://localhost:5000. —> System.AggregateException: One or more errors occurred. (Method ‘Rent’ in type ‘System.Buffers.MemoryPool’ from assembly ‘System.IO.Pipelines, Version=0.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60’ does not have an implementation.) (Method ‘Rent’ in type ‘System.Buffers.MemoryPool’ from assembly ‘System.IO.Pipelines, Version=0.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60’ does not have an implementation.) —> System.TypeLoadException: Method ‘Rent’ in type ‘System.Buffers.MemoryPool’ from assembly ‘System.IO.Pipelines, Version=0.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60’ does not have an implementation. at Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.LibuvThread…ctor(LibuvTransport transport) at Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.LibuvTransport.BindAsync() at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServer.<>c__DisplayClass22_0
1.<<StartAsync>g__OnBind|0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindEndpointAsync(ListenOptions endpoint, AddressBindContext context) at Microsoft.AspNetCore.Server.Kestrel.Core.LocalhostListenOptions.BindAsync(AddressBindContext context) --- End of inner exception stack trace --- --- End of inner exception stack trace --- at Microsoft.AspNetCore.Server.Kestrel.Core.LocalhostListenOptions.BindAsync(AddressBindContext context) at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.AddressesStrategy.BindAsync(AddressBindContext context) at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindAsync(IServerAddressesFeature addresses, KestrelServerOptions serverOptions, ILogger logger, Func
2 createBinding) at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServer.StartAsync[TContext](IHttpApplication`1 application, CancellationToken cancellationToken) at Microsoft.AspNetCore.Hosting.Internal.WebHost.StartAsync(CancellationToken cancellationToken) at Microsoft.AspNetCore.Hosting.WebHostExtensions.RunAsync(IWebHost host, CancellationToken token, String shutdownMessage) at Microsoft.AspNetCore.Hosting.WebHostExtensions.RunAsync(IWebHost host, CancellationToken token) at Microsoft.AspNetCore.Hosting.WebHostExtensions.Run(IWebHost host) at Charlesfund.Community.App.Program.Main(String[] args) in D:\Projects\Charlesfund.Community\Charlesfund.Community.App\Program.cs:line 23 Application is shutting down…
I then installed the same version of .net core, and got the same error.
Expected behavior
I can run the software
Actual behavior
Software builds, but cannot run.
Environment data
dotnet --info
output: dotnet --info .NET Core SDK (reflecting any global.json): Version: 2.1.400-preview-008659 Commit: 64fbb3a81bRuntime Environment: OS Name: Windows OS Version: 10.0.16299 OS Platform: Windows RID: win10-x64 Base Path: C:\Program Files\dotnet\sdk\2.1.400-preview-008659\
Host (useful for support): Version: 2.1.0-preview3-26411-06 Commit: 8faa8fcfcf
.NET Core SDKs installed: 2.1.101 [C:\Program Files\dotnet\sdk] 2.1.300-preview2-008375 [C:\Program Files\dotnet\sdk] 2.1.400-preview-008659 [C:\Program Files\dotnet\sdk]
.NET Core runtimes installed: Microsoft.AspNetCore.All 2.1.0-preview2-30338 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.All 2.1.0-preview2-30475 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.App 2.1.0-preview2-30338 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 2.1.0-preview2-30475 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.NETCore.App 2.0.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 2.0.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 2.1.0-preview1-26216-03 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 2.1.0-preview2-26313-01 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 2.1.0-preview3-26411-06 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
To install additional .NET Core runtimes or SDKs: https://aka.ms/dotnet-download
Issue Analytics
- State:
- Created 5 years ago
- Comments:9 (3 by maintainers)
What happens here is that preview1 of ASP.NET Core was built targeting
Microsoft.NETCore.App 2.1.0-preview1-26216-03
but when updating SDK you also update your Microsoft.NETCore.App reference to the latest version and there are some incompatibilities between previews.Two things you can do:
<RuntimeFrameworkVersion>2.1.0-preview1-26216-03</RuntimeFrameworkVersion>
after<TargetFramework>...</TargetFramework>
to force the version of shared runtime back to a compatible one.I was able to update my dependencies (finally). The error no longer appears.