Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add net8.0 to SDK v8 #112

Merged
merged 17 commits into from
Mar 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,12 @@
<File Include="$(DropFolderNet7)Microsoft.ServiceFabric.AspNetCore.dll">
<TargetPath>lib\net7.0</TargetPath>
</File>
<File Include="$(DropFolderNet8)Microsoft.ServiceFabric.AspNetCore.xml">
<TargetPath>lib\net8.0</TargetPath>
</File>
<File Include="$(DropFolderNet8)Microsoft.ServiceFabric.AspNetCore.dll">
<TargetPath>lib\net8.0</TargetPath>
</File>
<File Include="$(DropFolderNetFramework)Microsoft.ServiceFabric.AspNetCore.dll">
<TargetPath>runtimes\win\lib\net462</TargetPath>
</File>
Expand Down Expand Up @@ -110,6 +116,14 @@
<TargetFramework>net7.0</TargetFramework>
</FrameworkReference>

<Dependency Include="Microsoft.ServiceFabric.Services">
<Version>[$(NugetPkg_Version_Microsoft_ServiceFabric_Services)]</Version>
<TargetFramework>net8.0</TargetFramework>
</Dependency>
<FrameworkReference Include="Microsoft.AspNetCore.App">
<TargetFramework>net8.0</TargetFramework>
</FrameworkReference>

<Dependency Include="Microsoft.ServiceFabric.Services">
<Version>[$(NugetPkg_Version_Microsoft_ServiceFabric_Services)]</Version>
<TargetFramework>net462</TargetFramework>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,12 @@
<File Include="$(DropFolderNet7)Microsoft.ServiceFabric.AspNetCore.Configuration.xml">
<TargetPath>lib\net7.0</TargetPath>
</File>
<File Include="$(DropFolderNet8)Microsoft.ServiceFabric.AspNetCore.Configuration.dll">
<TargetPath>lib\net8.0</TargetPath>
</File>
<File Include="$(DropFolderNet8)Microsoft.ServiceFabric.AspNetCore.Configuration.xml">
<TargetPath>lib\net8.0</TargetPath>
</File>
<File Include="$(DropFolderNetFramework)Microsoft.ServiceFabric.AspNetCore.Configuration.dll">
<TargetPath>runtimes\win\lib\net462</TargetPath>
</File>
Expand Down Expand Up @@ -110,6 +116,14 @@
<TargetFramework>net7.0</TargetFramework>
</FrameworkReference>

<Dependency Include="Microsoft.ServiceFabric.Services">
<Version>[$(NugetPkg_Version_Microsoft_ServiceFabric_Services)]</Version>
<TargetFramework>net8.0</TargetFramework>
</Dependency>
<FrameworkReference Include="Microsoft.AspNetCore.App">
<TargetFramework>net8.0</TargetFramework>
</FrameworkReference>

<Dependency Include="Microsoft.ServiceFabric.Services">
<Version>[$(NugetPkg_Version_Microsoft_ServiceFabric_Services)]</Version>
<TargetFramework>net462</TargetFramework>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,12 @@
<File Include="$(DropFolderNet7)Microsoft.ServiceFabric.AspNetCore.HttpSys.xml">
<TargetPath>lib\net7.0</TargetPath>
</File>
<File Include="$(DropFolderNet8)Microsoft.ServiceFabric.AspNetCore.HttpSys.dll">
<TargetPath>lib\net8.0</TargetPath>
</File>
<File Include="$(DropFolderNet8)Microsoft.ServiceFabric.AspNetCore.HttpSys.xml">
<TargetPath>lib\net8.0</TargetPath>
</File>
<File Include="$(DropFolderNetFramework)Microsoft.ServiceFabric.AspNetCore.HttpSys.dll">
<TargetPath>runtimes\win\lib\net462</TargetPath>
</File>
Expand Down Expand Up @@ -110,12 +116,20 @@
<TargetFramework>net7.0</TargetFramework>
</FrameworkReference>

<Dependency Include="Microsoft.ServiceFabric.AspNetCore.Abstractions">
<Version>[$(NuGetPackageVersion)]</Version>
<TargetFramework>net8.0</TargetFramework>
</Dependency>
<FrameworkReference Include="Microsoft.AspNetCore.App">
<TargetFramework>net8.0</TargetFramework>
</FrameworkReference>

<Dependency Include="Microsoft.ServiceFabric.AspNetCore.Abstractions">
<Version>[$(NuGetPackageVersion)]</Version>
<TargetFramework>net462</TargetFramework>
</Dependency>
<Dependency Include="Microsoft.AspNetCore.Server.HttpSys">
<Version>2.1.0</Version>
<Version>2.1.12</Version>
<TargetFramework>net462</TargetFramework>
</Dependency>
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,12 @@
<File Include="$(DropFolderNet7)Microsoft.ServiceFabric.AspNetCore.Kestrel.xml">
<TargetPath>lib\net7.0</TargetPath>
</File>
<File Include="$(DropFolderNet8)Microsoft.ServiceFabric.AspNetCore.Kestrel.dll">
<TargetPath>lib\net8.0</TargetPath>
</File>
<File Include="$(DropFolderNet8)Microsoft.ServiceFabric.AspNetCore.Kestrel.xml">
<TargetPath>lib\net8.0</TargetPath>
</File>
<File Include="$(DropFolderNetFramework)Microsoft.ServiceFabric.AspNetCore.Kestrel.dll">
<TargetPath>runtimes\win\lib\net462</TargetPath>
</File>
Expand Down Expand Up @@ -110,6 +116,14 @@
<TargetFramework>net7.0</TargetFramework>
</FrameworkReference>

<Dependency Include="Microsoft.ServiceFabric.AspNetCore.Abstractions">
<Version>[$(NuGetPackageVersion)]</Version>
<TargetFramework>net8.0</TargetFramework>
</Dependency>
<FrameworkReference Include="Microsoft.AspNetCore.App">
<TargetFramework>net8.0</TargetFramework>
</FrameworkReference>

<Dependency Include="Microsoft.ServiceFabric.AspNetCore.Abstractions">
<Version>[$(NuGetPackageVersion)]</Version>
<TargetFramework>net462</TargetFramework>
Expand Down
3 changes: 3 additions & 0 deletions nuprojs/SF.AspNetCore.Internal/SF.AspNetCore.Internal.nuproj
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,8 @@
<File Include="$(DropFolderNet7)*.*">
<TargetPath>lib\net7.0</TargetPath>
</File>
<File Include="$(DropFolderNet8)*.*">
<TargetPath>lib\net8.0</TargetPath>
</File>
</ItemGroup>
</Project>
3 changes: 2 additions & 1 deletion properties/service_fabric_common.props
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
<DropFolderNet5>$(RepoRoot)drop\$(Configuration)\net5.0\</DropFolderNet5>
<DropFolderNet6>$(RepoRoot)drop\$(Configuration)\net6.0\</DropFolderNet6>
<DropFolderNet7>$(RepoRoot)drop\$(Configuration)\net7.0\</DropFolderNet7>
<DropFolderNet8>$(RepoRoot)drop\$(Configuration)\net8.0\</DropFolderNet8>
<NugetPackageDropFolder>$(DropFolder)\packages</NugetPackageDropFolder>

<!-- Set Nuget exe path -->
Expand All @@ -30,7 +31,7 @@
<!-- TODO: Versions numbers are changed here manually for now, Integrate this with GitVersion. -->
<MajorVersion>8</MajorVersion>
<MinorVersion>0</MinorVersion>
<BuildVersion>0</BuildVersion>
<BuildVersion>1</BuildVersion>
<Revision>0</Revision>

</PropertyGroup>
Expand Down
8 changes: 8 additions & 0 deletions properties/service_fabric_managed.targets
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,14 @@
<BinariesNet7 Include="src\Microsoft.ServiceFabric.AspNetCore.Kestrel\$(OutputPath)net7.0\Microsoft.ServiceFabric.AspNetCore.Kestrel.*"/>
</ItemGroup>
<Copy SourceFiles="@(BinariesNet7)" DestinationFiles="@(BinariesNet7->'$(DropFolderNet7)\%(Destination)\%(RecursiveDir)%(Filename)%(Extension)')" />

<ItemGroup>
<BinariesNet8 Include="src\Microsoft.ServiceFabric.AspNetCore\$(OutputPath)net8.0\Microsoft.ServiceFabric.AspNetCore.*"/>
<BinariesNet8 Include="src\Microsoft.ServiceFabric.AspNetCore.Configuration\$(OutputPath)net8.0\Microsoft.ServiceFabric.AspNetCore.Configuration.*"/>
<BinariesNet8 Include="src\Microsoft.ServiceFabric.AspNetCore.HttpSys\$(OutputPath)net8.0\Microsoft.ServiceFabric.AspNetCore.HttpSys.*"/>
<BinariesNet8 Include="src\Microsoft.ServiceFabric.AspNetCore.Kestrel\$(OutputPath)net8.0\Microsoft.ServiceFabric.AspNetCore.Kestrel.*"/>
</ItemGroup>
<Copy SourceFiles="@(BinariesNet8)" DestinationFiles="@(BinariesNet8->'$(DropFolderNet8)\%(Destination)\%(RecursiveDir)%(Filename)%(Extension)')" />
</Target>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<AssemblyName>Microsoft.ServiceFabric.AspNetCore.Configuration</AssemblyName>
<RootNamespace>Microsoft.ServiceFabric.AspNetCore.Configuration</RootNamespace>
<DocumentationFile>$(OutputPath)\$(AssemblyName).xml</DocumentationFile>
<TargetFrameworks>net462;netcoreapp3.1;net5.0;net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>net462;netcoreapp3.1;net5.0;net6.0;net7.0;net8.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.ServiceFabric.Services" Version="$(NugetPkg_Version_Microsoft_ServiceFabric_Services)" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<RootNamespace>Microsoft.ServiceFabric.Services.Communication.AspNetCore</RootNamespace>
<AssemblyName>Microsoft.ServiceFabric.AspNetCore.HttpSys</AssemblyName>
<DocumentationFile>$(OutputPath)\$(AssemblyName).xml</DocumentationFile>
<TargetFrameworks>net462;netcoreapp3.1;net5.0;net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>net462;netcoreapp3.1;net5.0;net6.0;net7.0;net8.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.ServiceFabric" Version="$(NugetPkg_Version_Microsoft_ServiceFabric)" />
Expand All @@ -15,7 +15,7 @@
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net462'">
<PackageReference Include="Microsoft.AspNetCore.Server.HttpSys" Version="2.1.0" />
<PackageReference Include="Microsoft.AspNetCore.Server.HttpSys" Version="2.1.12" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Microsoft.ServiceFabric.AspNetCore\Microsoft.ServiceFabric.AspNetCore.csproj" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<AssemblyName>Microsoft.ServiceFabric.AspNetCore.Kestrel</AssemblyName>
<RootNamespace>Microsoft.ServiceFabric.Services.Communication.AspNetCore</RootNamespace>
<DocumentationFile>$(OutputPath)\$(AssemblyName).xml</DocumentationFile>
<TargetFrameworks>net462;netcoreapp3.1;net5.0;net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>net462;netcoreapp3.1;net5.0;net6.0;net7.0;net8.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.ServiceFabric" Version="$(NugetPkg_Version_Microsoft_ServiceFabric)" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<AssemblyName>Microsoft.ServiceFabric.AspNetCore</AssemblyName>
<RootNamespace>Microsoft.ServiceFabric.Services.Communication.AspNetCore</RootNamespace>
<DocumentationFile>$(OutputPath)\$(AssemblyName).xml</DocumentationFile>
<TargetFrameworks>net462;netcoreapp3.1;net5.0;net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>net462;netcoreapp3.1;net5.0;net6.0;net7.0;net8.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.ServiceFabric.Services" Version="$(NugetPkg_Version_Microsoft_ServiceFabric_Services)" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<PropertyGroup>
<AssemblyName>Microsoft.ServiceFabric.AspNetCore.Tests</AssemblyName>
<RootNamespace>Microsoft.ServiceFabric.AspNetCore.Tests</RootNamespace>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<DocumentationFile>$(OutputPath)\$(AssemblyName).xml</DocumentationFile>
</PropertyGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ internal static class TestHelper
public static T CreateInstanced<T>()
where T : class
{
#pragma warning disable SYSLIB0050 // FormatterServices is obsolete
return FormatterServices.GetSafeUninitializedObject(typeof(T)) as T;
#pragma warning restore SYSLIB0050
}

public static T Set<T>(this T instance, string property, object value)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public void VerifyReturnCode410(string hostType)
(httpContext) =>
{
nextCalled = true;
return Task.FromResult(true);
return Task.CompletedTask;
}, this.listener.UrlSuffix);

// send a request in which Path is different than urlSuffix
Expand Down Expand Up @@ -165,7 +165,7 @@ private void VerifyNextInvocation()
nextCalled = true;
Console.WriteLine("In Next Request Delegate: HttpRequest.Path: " + httpContext.Request.Path);
Console.WriteLine("In Next Request Delegate: HttpRequest.PathBase: " + httpContext.Request.PathBase);
return Task.FromResult(true);
return Task.CompletedTask;
}, this.listener.UrlSuffix);

// send a request in which Path is same as urlSuffix
Expand Down Expand Up @@ -198,7 +198,7 @@ private void VerifyPathsInNextInvocation()
Console.WriteLine("In Next Request Delegate: HttpRequest.PathBase: " + httpContext.Request.PathBase);

nextCalled = true;
return Task.FromResult(true);
return Task.CompletedTask;
}, this.listener.UrlSuffix);

// send a request in which Path is different than urlSuffix, but has extra segment after it.
Expand Down