diff --git a/test/System.Net.Http.Formatting.Test/Formatting/XmlMediaTypeFormatterTests.cs b/test/System.Net.Http.Formatting.Test/Formatting/XmlMediaTypeFormatterTests.cs index 2bec6ccf8..b1865376b 100644 --- a/test/System.Net.Http.Formatting.Test/Formatting/XmlMediaTypeFormatterTests.cs +++ b/test/System.Net.Http.Formatting.Test/Formatting/XmlMediaTypeFormatterTests.cs @@ -484,6 +484,7 @@ public async Task ReadFromStream_AsyncRoundTripsWriteToStreamUsingDataContractSe } } +#if !NETCOREAPP2_0 // DBNull not serializable on .NET Core 2.0. [Fact] public async Task ReadFromStreamAsync_RoundTripsWriteToStreamAsyncUsingDataContractSerializer_DBNull() { @@ -515,6 +516,7 @@ public async Task ReadFromStreamAsync_RoundTripsWriteToStreamAsyncUsingDataContr // Lower levels convert DBNull.Value to empty string on read Assert.Equal(String.Empty, readObj); } +#endif public override Task ReadFromStreamAsync_UsesCorrectCharacterEncoding(string content, string encoding, bool isDefaultEncoding) {