diff --git a/HttpAbstractions.sln b/HttpAbstractions.sln
index 684bc312f2..9525343a98 100644
--- a/HttpAbstractions.sln
+++ b/HttpAbstractions.sln
@@ -1,6 +1,6 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
-VisualStudioVersion = 15.0.26120.4
+VisualStudioVersion = 15.0.26228.9
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{A5A15F1C-885A-452A-A731-B0173DDBD913}"
EndProject
@@ -53,6 +53,7 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{ED7BCAC5-2796-44BD-9954-7C248263BC8B}"
ProjectSection(SolutionItems) = preProject
build\common.props = build\common.props
+ build\dependencies.props = build\dependencies.props
build\Key.snk = build\Key.snk
EndProjectSection
EndProject
diff --git a/build/dependencies.props b/build/dependencies.props
index 5a4c06ce33..12a50aa67f 100644
--- a/build/dependencies.props
+++ b/build/dependencies.props
@@ -3,6 +3,7 @@
1.2.0-*
4.3.0
1.6.1
+ 2.0.0-*
15.0.0
2.2.0
diff --git a/samples/SampleApp/SampleApp.csproj b/samples/SampleApp/SampleApp.csproj
index 1ea088220c..d496a4e293 100644
--- a/samples/SampleApp/SampleApp.csproj
+++ b/samples/SampleApp/SampleApp.csproj
@@ -1,7 +1,9 @@
+
+
- net451;netcoreapp1.1
+ netcoreapp2.0;net451
Exe
diff --git a/test/Microsoft.AspNetCore.Http.Abstractions.Tests/Microsoft.AspNetCore.Http.Abstractions.Tests.csproj b/test/Microsoft.AspNetCore.Http.Abstractions.Tests/Microsoft.AspNetCore.Http.Abstractions.Tests.csproj
index 1499a5d2f7..ce293532eb 100644
--- a/test/Microsoft.AspNetCore.Http.Abstractions.Tests/Microsoft.AspNetCore.Http.Abstractions.Tests.csproj
+++ b/test/Microsoft.AspNetCore.Http.Abstractions.Tests/Microsoft.AspNetCore.Http.Abstractions.Tests.csproj
@@ -3,8 +3,8 @@
- netcoreapp1.1;net452
- netcoreapp1.1
+ netcoreapp2.0;net452
+ netcoreapp2.0
diff --git a/test/Microsoft.AspNetCore.Http.Extensions.Tests/Microsoft.AspNetCore.Http.Extensions.Tests.csproj b/test/Microsoft.AspNetCore.Http.Extensions.Tests/Microsoft.AspNetCore.Http.Extensions.Tests.csproj
index a61de3299b..d7a065af56 100644
--- a/test/Microsoft.AspNetCore.Http.Extensions.Tests/Microsoft.AspNetCore.Http.Extensions.Tests.csproj
+++ b/test/Microsoft.AspNetCore.Http.Extensions.Tests/Microsoft.AspNetCore.Http.Extensions.Tests.csproj
@@ -3,8 +3,8 @@
- netcoreapp1.1;net452
- netcoreapp1.1
+ netcoreapp2.0;net452
+ netcoreapp2.0
diff --git a/test/Microsoft.AspNetCore.Http.Features.Tests/Microsoft.AspNetCore.Http.Features.Tests.csproj b/test/Microsoft.AspNetCore.Http.Features.Tests/Microsoft.AspNetCore.Http.Features.Tests.csproj
index 5c3160c0d4..fde9ce797e 100644
--- a/test/Microsoft.AspNetCore.Http.Features.Tests/Microsoft.AspNetCore.Http.Features.Tests.csproj
+++ b/test/Microsoft.AspNetCore.Http.Features.Tests/Microsoft.AspNetCore.Http.Features.Tests.csproj
@@ -3,8 +3,8 @@
- netcoreapp1.1;net452
- netcoreapp1.1
+ netcoreapp2.0;net452
+ netcoreapp2.0
diff --git a/test/Microsoft.AspNetCore.Http.Tests/HttpContextFactoryTests.cs b/test/Microsoft.AspNetCore.Http.Tests/HttpContextFactoryTests.cs
index fc5c5386fa..c7bb075df9 100644
--- a/test/Microsoft.AspNetCore.Http.Tests/HttpContextFactoryTests.cs
+++ b/test/Microsoft.AspNetCore.Http.Tests/HttpContextFactoryTests.cs
@@ -64,6 +64,9 @@ namespace Microsoft.AspNetCore.Http
// Assert
Assert.True(ReferenceEquals(context, accessor.HttpContext));
}
+#elif NETCOREAPP2_0
+#else
+#error Target framework needs to be updated
#endif
}
}
\ No newline at end of file
diff --git a/test/Microsoft.AspNetCore.Http.Tests/Microsoft.AspNetCore.Http.Tests.csproj b/test/Microsoft.AspNetCore.Http.Tests/Microsoft.AspNetCore.Http.Tests.csproj
index 11802dc165..9de27f7667 100644
--- a/test/Microsoft.AspNetCore.Http.Tests/Microsoft.AspNetCore.Http.Tests.csproj
+++ b/test/Microsoft.AspNetCore.Http.Tests/Microsoft.AspNetCore.Http.Tests.csproj
@@ -3,8 +3,8 @@
- netcoreapp1.1;net452
- netcoreapp1.1
+ netcoreapp2.0;net452
+ netcoreapp2.0
diff --git a/test/Microsoft.AspNetCore.Owin.Tests/Microsoft.AspNetCore.Owin.Tests.csproj b/test/Microsoft.AspNetCore.Owin.Tests/Microsoft.AspNetCore.Owin.Tests.csproj
index 72e70f824f..30a4721d3c 100644
--- a/test/Microsoft.AspNetCore.Owin.Tests/Microsoft.AspNetCore.Owin.Tests.csproj
+++ b/test/Microsoft.AspNetCore.Owin.Tests/Microsoft.AspNetCore.Owin.Tests.csproj
@@ -3,8 +3,8 @@
- netcoreapp1.1;net452
- netcoreapp1.1
+ netcoreapp2.0;net452
+ netcoreapp2.0
diff --git a/test/Microsoft.AspNetCore.WebUtilities.Tests/FileBufferingReadStreamTests.cs b/test/Microsoft.AspNetCore.WebUtilities.Tests/FileBufferingReadStreamTests.cs
index 2a96d197da..ea8e609b49 100644
--- a/test/Microsoft.AspNetCore.WebUtilities.Tests/FileBufferingReadStreamTests.cs
+++ b/test/Microsoft.AspNetCore.WebUtilities.Tests/FileBufferingReadStreamTests.cs
@@ -295,8 +295,10 @@ namespace Microsoft.AspNetCore.WebUtilities
{
#if NET452
return AppDomain.CurrentDomain.BaseDirectory;
-#else
+#elif NETCOREAPP2_0
return AppContext.BaseDirectory;
+#else
+#error Target framework needs to be updated
#endif
}
}
diff --git a/test/Microsoft.AspNetCore.WebUtilities.Tests/HttpResponseStreamWriterTest.cs b/test/Microsoft.AspNetCore.WebUtilities.Tests/HttpResponseStreamWriterTest.cs
index 7b68cfbe23..41a73e8876 100644
--- a/test/Microsoft.AspNetCore.WebUtilities.Tests/HttpResponseStreamWriterTest.cs
+++ b/test/Microsoft.AspNetCore.WebUtilities.Tests/HttpResponseStreamWriterTest.cs
@@ -50,6 +50,9 @@ namespace Microsoft.AspNetCore.WebUtilities.Test
Assert.Equal(0, stream.FlushCallCount);
Assert.Equal(0, stream.FlushAsyncCallCount);
}
+#elif NETCOREAPP2_0
+#else
+#error Target framework needs to be updated
#endif
[Fact]
@@ -83,6 +86,9 @@ namespace Microsoft.AspNetCore.WebUtilities.Test
// Assert
Assert.Equal(0, stream.CloseCallCount);
}
+#elif NETCOREAPP2_0
+#else
+#error Target framework needs to be updated
#endif
[Fact]
@@ -115,8 +121,10 @@ namespace Microsoft.AspNetCore.WebUtilities.Test
// Act
#if NET452
writer.Close();
-#else
+#elif NETCOREAPP2_0
writer.Dispose();
+#else
+#error Target framework needs to be updated
#endif
// Assert
@@ -232,7 +240,7 @@ namespace Microsoft.AspNetCore.WebUtilities.Test
var writer = new HttpResponseStreamWriter(stream, Encoding.UTF8);
await writer.WriteAsync(new string('a', byteLength));
- await Assert.ThrowsAsync(() => writer.FlushAsync());
+ await Assert.ThrowsAsync(() => writer.FlushAsync());
// Act
writer.Dispose();
@@ -337,9 +345,12 @@ namespace Microsoft.AspNetCore.WebUtilities.Test
[Theory]
[InlineData("你好世界", "utf-16")]
-#if !NETCOREAPP1_1
+#if NET452
// CoreCLR does not like shift_jis as an encoding.
[InlineData("こんにちは世界", "shift_jis")]
+#elif NETCOREAPP2_0
+#else
+#error Target framework needs to be updated
#endif
[InlineData("హలో ప్రపంచ", "iso-8859-1")]
[InlineData("வணக்கம் உலக", "utf-32")]
@@ -368,11 +379,14 @@ namespace Microsoft.AspNetCore.WebUtilities.Test
[InlineData('你', 1023, "utf-16")]
[InlineData('你', 1024, "utf-16")]
[InlineData('你', 1050, "utf-16")]
-#if !NETCOREAPP1_1
+#if NET452
// CoreCLR does not like shift_jis as an encoding.
[InlineData('こ', 1023, "shift_jis")]
[InlineData('こ', 1024, "shift_jis")]
[InlineData('こ', 1050, "shift_jis")]
+#elif NETCOREAPP2_0
+#else
+#error Target framework needs to be updated
#endif
[InlineData('హ', 1023, "iso-8859-1")]
[InlineData('హ', 1024, "iso-8859-1")]
@@ -508,6 +522,9 @@ namespace Microsoft.AspNetCore.WebUtilities.Test
CloseCallCount++;
base.Close();
}
+#elif NETCOREAPP2_0
+#else
+#error Target framework needs to be updated
#endif
protected override void Dispose(bool disposing)
diff --git a/test/Microsoft.AspNetCore.WebUtilities.Tests/Microsoft.AspNetCore.WebUtilities.Tests.csproj b/test/Microsoft.AspNetCore.WebUtilities.Tests/Microsoft.AspNetCore.WebUtilities.Tests.csproj
index f9ea3a27ea..c4c0973c46 100644
--- a/test/Microsoft.AspNetCore.WebUtilities.Tests/Microsoft.AspNetCore.WebUtilities.Tests.csproj
+++ b/test/Microsoft.AspNetCore.WebUtilities.Tests/Microsoft.AspNetCore.WebUtilities.Tests.csproj
@@ -3,8 +3,8 @@
- netcoreapp1.1;net452
- netcoreapp1.1
+ netcoreapp2.0;net452
+ netcoreapp2.0
diff --git a/test/Microsoft.Net.Http.Headers.Tests/Microsoft.Net.Http.Headers.Tests.csproj b/test/Microsoft.Net.Http.Headers.Tests/Microsoft.Net.Http.Headers.Tests.csproj
index 4a17c06b84..1996f25c58 100644
--- a/test/Microsoft.Net.Http.Headers.Tests/Microsoft.Net.Http.Headers.Tests.csproj
+++ b/test/Microsoft.Net.Http.Headers.Tests/Microsoft.Net.Http.Headers.Tests.csproj
@@ -3,8 +3,8 @@
- netcoreapp1.1;net452
- netcoreapp1.1
+ netcoreapp2.0;net452
+ netcoreapp2.0