Skip to content

Commit

Permalink
Add net6.0 targets (#972)
Browse files Browse the repository at this point in the history
* Add net6.0 targets

* Update SDK

* Bump to latest arcade SDK

* Excluse 6.0 target on Auth sample

* Bump SDK version to latest

* Keep custom Json converters in current 6.0 builds
  • Loading branch information
MihaZupan authored May 21, 2021
1 parent cbfc70d commit 36f6b15
Show file tree
Hide file tree
Showing 25 changed files with 26 additions and 34 deletions.
4 changes: 0 additions & 4 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Dependencies>
<ProductDependencies>
<Dependency Name="Microsoft.NETCore.App" Version="5.0.0-rtm.20529.3">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>7ef6d50b312217d2f7c17b9697891fa8ab98a19d</Sha>
</Dependency>
</ProductDependencies>
<ToolsetDependencies>
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="6.0.0-beta.21264.2">
Expand Down
4 changes: 0 additions & 4 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,4 @@
-->
<PreReleaseVersionLabel>preview.12</PreReleaseVersionLabel>
</PropertyGroup>
<!--Package versions-->
<PropertyGroup>
<MicrosoftNETCoreAppPackageVersion>5.0.0-rtm.20529.3</MicrosoftNETCoreAppPackageVersion>
</PropertyGroup>
</Project>
5 changes: 2 additions & 3 deletions global.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
{
"sdk": {
"version": "6.0.100-preview.3.21202.5"
"version": "6.0.100-preview.6.21271.8"
},
"tools": {
"dotnet": "6.0.100-preview.3.21202.5",
"dotnet": "6.0.100-preview.6.21271.8",
"runtimes": {
"dotnet": [
"$(MicrosoftNETCoreAppPackageVersion)",
"3.1.14",
"5.0.5"
],
Expand Down
2 changes: 1 addition & 1 deletion samples/BasicYarpSample/BasicYarpSample.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFrameworks>net6.0;net5.0</TargetFrameworks>
<LangVersion>latest</LangVersion>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFrameworks>net5.0</TargetFrameworks>
<TargetFrameworks>net6.0;net5.0</TargetFrameworks>
<OutputType>Exe</OutputType>
<RootNamespace>Yarp.Sample</RootNamespace>
<LangVersion>latest</LangVersion>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFrameworks>net5.0;netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>net6.0;net5.0;netcoreapp3.1</TargetFrameworks>
<OutputType>Exe</OutputType>
<RootNamespace>Yarp.Sample</RootNamespace>
<LangVersion>latest</LangVersion>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFrameworks>net5.0;netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>net6.0;net5.0;netcoreapp3.1</TargetFrameworks>
<OutputType>Exe</OutputType>
<RootNamespace>Yarp.Sample</RootNamespace>
<LangVersion>latest</LangVersion>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFrameworks>net5.0;netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>net6.0;net5.0;netcoreapp3.1</TargetFrameworks>
<OutputType>Exe</OutputType>
<RootNamespace>Yarp.Sample</RootNamespace>
<LangVersion>latest</LangVersion>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFrameworks>net5.0;netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>net6.0;net5.0;netcoreapp3.1</TargetFrameworks>
<OutputType>Exe</OutputType>
<RootNamespace>Yarp.Sample</RootNamespace>
<LangVersion>latest</LangVersion>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFrameworks>net5.0</TargetFrameworks>
<TargetFrameworks>net6.0;net5.0</TargetFrameworks>
<OutputType>Exe</OutputType>
<RootNamespace>Yarp.Sample</RootNamespace>
<LangVersion>latest</LangVersion>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFrameworks>net5.0;netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>net6.0;net5.0;netcoreapp3.1</TargetFrameworks>
<OutputType>Exe</OutputType>
<RootNamespace>Yarp.Sample</RootNamespace>
<PlatformTarget>x64</PlatformTarget>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFrameworks>net5.0;netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>net6.0;net5.0;netcoreapp3.1</TargetFrameworks>
<OutputType>Exe</OutputType>
<RootNamespace>Yarp.Sample</RootNamespace>
<LangVersion>latest</LangVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public TestEnvironment(
destinationServices => { },
destinationApp =>
{
destinationApp.Use(async (context, next) => await destinationGetDelegate(context));
destinationApp.Run(destinationGetDelegate);
},
configureProxy,
configureProxyApp,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net5.0;netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>net6.0;net5.0;netcoreapp3.1</TargetFrameworks>
<OutputType>Library</OutputType>
<RootNamespace>Yarp.ReverseProxy</RootNamespace>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net5.0;netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>net6.0;net5.0;netcoreapp3.1</TargetFrameworks>
<OutputType>Library</OutputType>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net5.0;netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>net6.0;net5.0;netcoreapp3.1</TargetFrameworks>
<OutputType>Library</OutputType>
<RootNamespace>Yarp.ReverseProxy.ServiceFabric</RootNamespace>
<PlatformTarget>x64</PlatformTarget>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net5.0;netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>net6.0;net5.0;netcoreapp3.1</TargetFrameworks>
<OutputType>Library</OutputType>
<RootNamespace>Yarp.ReverseProxy</RootNamespace>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -411,15 +411,16 @@ public void Cluster_CanBeJsonSerialized()

var options = new JsonSerializerOptions
{
#if !NET6_0_OR_GREATER
// Future 6.0 builds will contain the fix to these missing converters
//#if !NET6_0_OR_GREATER
Converters =
{
// TimeSpans https://github.com/dotnet/runtime/issues/29932
new TimeSpanConverter(),
// Version https://github.com/dotnet/runtime/pull/41384
new VersionConverter()
}
#endif
//#endif
};
var json = JsonSerializer.Serialize(cluster1, options);
var cluster2 = JsonSerializer.Deserialize<ClusterConfig>(json, options);
Expand Down
2 changes: 1 addition & 1 deletion test/ReverseProxy.Tests/Yarp.ReverseProxy.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net5.0;netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>net6.0;net5.0;netcoreapp3.1</TargetFrameworks>
<OutputType>Library</OutputType>
<RootNamespace>Yarp.ReverseProxy</RootNamespace>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion testassets/BenchmarkApp/BenchmarkApp.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFrameworks>net5.0;netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>net6.0;net5.0;netcoreapp3.1</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion testassets/ReverseProxy.Code/ReverseProxy.Code.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFrameworks>net5.0;netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>net6.0;net5.0;netcoreapp3.1</TargetFrameworks>
<OutputType>Exe</OutputType>
<RootNamespace>Yarp.ReverseProxy.Sample</RootNamespace>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion testassets/ReverseProxy.Config/ReverseProxy.Config.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFrameworks>net5.0;netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>net6.0;net5.0;netcoreapp3.1</TargetFrameworks>
<OutputType>Exe</OutputType>
<RootNamespace>Yarp.ReverseProxy.Sample</RootNamespace>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion testassets/ReverseProxy.Direct/ReverseProxy.Direct.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFrameworks>net5.0;netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>net6.0;net5.0;netcoreapp3.1</TargetFrameworks>
<OutputType>Exe</OutputType>
<RootNamespace>Yarp.ReverseProxy.Sample</RootNamespace>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion testassets/TestClient/TestClient.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<OutputType>Exe</OutputType>
</PropertyGroup>

Expand Down
2 changes: 1 addition & 1 deletion testassets/TestServer/TestServer.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<OutputType>Exe</OutputType>
<RootNamespace>SampleServer</RootNamespace>
</PropertyGroup>
Expand Down

0 comments on commit 36f6b15

Please sign in to comment.