diff --git a/src/Servers/Kestrel/Transport.Sockets/src/Internal/SocketReceiver.cs b/src/Servers/Kestrel/Transport.Sockets/src/Internal/SocketReceiver.cs index 5d33f49829..3c3451cbcc 100644 --- a/src/Servers/Kestrel/Transport.Sockets/src/Internal/SocketReceiver.cs +++ b/src/Servers/Kestrel/Transport.Sockets/src/Internal/SocketReceiver.cs @@ -15,7 +15,13 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal public SocketAwaitableEventArgs WaitForDataAsync() { +#if NETCOREAPP2_1 + _awaitableEventArgs.SetBuffer(Memory.Empty); +#elif NETSTANDARD2_0 _awaitableEventArgs.SetBuffer(Array.Empty(), 0, 0); +#else +#error TFMs need to be updated +#endif if (!_socket.ReceiveAsync(_awaitableEventArgs)) { diff --git a/src/SiteExtensions/Directory.Build.props b/src/SiteExtensions/Directory.Build.props index e0780dd926..b6e2f87d64 100644 --- a/src/SiteExtensions/Directory.Build.props +++ b/src/SiteExtensions/Directory.Build.props @@ -1,7 +1,6 @@  - - + diff --git a/src/SiteExtensions/Directory.Build.targets b/src/SiteExtensions/Directory.Build.targets new file mode 100644 index 0000000000..3787302e64 --- /dev/null +++ b/src/SiteExtensions/Directory.Build.targets @@ -0,0 +1,5 @@ + + + + +