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

beam 3189 - initial net7 support #1975

Closed
wants to merge 4 commits into from
Closed
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
6 changes: 3 additions & 3 deletions .github/workflows/buildPR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
cancel-in-progress: true
strategy:
matrix:
dotnet-version: ['6.0.x' ]
dotnet-version: ['7.0.x' ]
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core SDK ${{ matrix.dotnet-version }}
Expand Down Expand Up @@ -49,7 +49,7 @@ jobs:
cancel-in-progress: true
strategy:
matrix:
dotnet-version: ['6.0.x' ]
dotnet-version: ['7.0.x' ]
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core SDK ${{ matrix.dotnet-version }}
Expand Down Expand Up @@ -77,7 +77,7 @@ jobs:
cancel-in-progress: true
strategy:
matrix:
dotnet-version: ['6.0.x' ]
dotnet-version: ['7.0.x' ]
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core SDK ${{ matrix.dotnet-version }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/buildPush.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
cancel-in-progress: true
strategy:
matrix:
dotnet-version: ['6.0.x' ]
dotnet-version: ['7.0.x' ]
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core SDK ${{ matrix.dotnet-version }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/generateApi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Setup .NET Core SDK
uses: actions/[email protected]
with:
dotnet-version: 6.0.x
dotnet-version: 7.0.x
- name: Install dotnet-format
run: dotnet tool install --global --version 5.1.250801 dotnet-format
- name: Build CLI
Expand Down
2 changes: 1 addition & 1 deletion build/docker/cli/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM mcr.microsoft.com/dotnet/sdk:6.0
FROM mcr.microsoft.com/dotnet/sdk:7.0

# RUN npm install -g json
ADD build/docker/scripts /scripts
Expand Down
2 changes: 1 addition & 1 deletion build/docker/image.microservice/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM mcr.microsoft.com/dotnet/sdk:6.0
FROM mcr.microsoft.com/dotnet/sdk:7.0

# RUN npm install -g json
ADD build/docker/scripts /scripts
Expand Down
2 changes: 1 addition & 1 deletion build/docker/nuget.microservice/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM mcr.microsoft.com/dotnet/sdk:6.0
FROM mcr.microsoft.com/dotnet/sdk:7.0

# RUN npm install -g json
ADD build/docker/scripts /scripts
Expand Down
8 changes: 4 additions & 4 deletions cli/cli/cli.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>disable</Nullable>

Expand Down Expand Up @@ -41,12 +41,12 @@
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="7.0.0-preview.4.22229.4" />
<PackageReference Include="Microsoft.OpenApi" Version="1.3.2" />
<PackageReference Include="Microsoft.OpenApi.Readers" Version="1.3.2" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="Serilog" Version="2.10.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
<PackageReference Include="Serilog" Version="2.12.0" />
<PackageReference Include="Serilog.Formatting.Compact" Version="1.1.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="3.1.1" />
<PackageReference Include="SharpZipLib" Version="1.3.3" />
<PackageReference Include="Spectre.Console" Version="0.44.0" />
<PackageReference Include="Spectre.Console" Version="0.45.0" />
<PackageReference Include="System.CodeDom" Version="6.0.0" />
<PackageReference Include="System.CommandLine" Version="2.0.0-beta3.22114.1" />
</ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions cli/tests/tests.csproj
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<Nullable>enable</Nullable>

<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.11.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.0" />
<PackageReference Include="Moq" Version="4.18.1" />
<PackageReference Include="NUnit" Version="3.13.2" />
<PackageReference Include="NUnit3TestAdapter" Version="4.0.0" />
Expand Down
5 changes: 5 additions & 0 deletions client/Packages/com.beamable.server/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Changed
- Microservices use dotnet7
- Microservices use Newtonsoft 13.0.2

## [1.10.0]
### Added
- `[InitializeService]` exposes `IDependencyProvider` as `Provider`, and `[ConfigureServices]` exposes `IDependencyBuilder` as `Builder`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ public class DockerfileGenerator
public MicroserviceConfigurationEntry Config { get; }

private bool DebuggingEnabled = true;
public const string DOTNET_RUNTIME_DEBUGGING_TOOLS_IMAGE = "mcr.microsoft.com/dotnet/runtime:6.0";
public const string DOTNET_RUNTIME_IMAGE = "mcr.microsoft.com/dotnet/runtime:6.0-alpine";
public const string DOTNET_RUNTIME_DEBUGGING_TOOLS_IMAGE = "mcr.microsoft.com/dotnet/runtime:7.0";
public const string DOTNET_RUNTIME_IMAGE = "mcr.microsoft.com/dotnet/runtime:7.0-alpine";


#if BEAMABLE_DEVELOPER
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public string GetString()
<PropertyGroup>
<DefineConstants>DB_MICROSERVICE;BEAMABLE_MICROSERVICE;BEAMABLE_IGNORE_MONGO_MOCKS</DefineConstants>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
</PropertyGroup>

<PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<Authors>Beamable Team</Authors>
<Company>Beamable</Company>

<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<AssemblyName>Beamable.Server.Common</AssemblyName>
<DefineConstants>BEAMABLE_IGNORE_MONGO_MOCKS</DefineConstants>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<Authors>Beamable Team</Authors>
<Company>Beamable</Company>

<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<AssemblyName>Beamable.Server</AssemblyName>
<DefineConstants>
BEAMABLE_IGNORE_MONGO_MOCKS
Expand Down Expand Up @@ -36,7 +36,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="System.CodeDom" Version="6.0.0" />
<PackageReference Include="System.CodeDom" Version="7.0.0" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion client/Packages/com.beamable/Common/beamable.common.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<Company>Beamable</Company>

<DefineConstants>DB_MICROSERVICE;DISABLE_BEAMABLE_ASYNCMETHODBUILDER;BEAMABLE_ENABLE_UNITY_SERIALIZATION_TYPES</DefineConstants>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<AssemblyName>Beamable.Common</AssemblyName>

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

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>disable</Nullable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="12.0.2" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
</ItemGroup>

<ItemGroup>
Expand Down
4 changes: 3 additions & 1 deletion microservice/microservice/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# BUILD AND REPACKAGE DOTNET SDK.
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build-env
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build-env

RUN dotnet --version
# commit the built sdk version to the base image...
Expand All @@ -12,5 +12,7 @@ RUN dotnet restore ./microservice.csproj
COPY . .
RUN dotnet publish ./microservice.csproj -c release -o /app

# FROM mcr.microsoft.com/dotnet/sdk:7.0
WORKDIR /app
# COPY --from=build-env /app .
ENTRYPOINT ["dotnet", "/app/microservice.dll"]
19 changes: 10 additions & 9 deletions microservice/microservice/Microservice.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,27 @@
<owners>Beamable</owners>
<description>This package contains the Beamable Microservice base code.</description>
<dependencies>
<group targetFramework="net6.0" />
<group targetFramework="net7.0" />
</dependencies>
<dependencies>
<dependency id="EmbedIO" version="3.4.*" />
<dependency id="LoxSmoke.DocXml" version="3.4.*" />
<dependency id="Microsoft.Extensions.DependencyInjection" version="6.0.0-preview.6.21352.12" />
<dependency id="Microsoft.OpenApi" version="1.2.*" />
<dependency id="Newtonsoft.Json" version="12.0.*" />
<dependency id="Serilog" version="2.10.*" />
<dependency id="Microsoft.Extensions.DependencyInjection" version="7.0.0" />
<dependency id="Microsoft.OpenApi" version="1.4.*" />
<dependency id="Newtonsoft.Json" version="13.0.*" />
<dependency id="Serilog" version="2.12.*" />
<dependency id="Serilog.Formatting.Compact" version="1.1.*" />
<dependency id="Serilog.Sinks.Console" version="3.1.*" />
<dependency id="Serilog.Sinks.Console" version="4.1.*" />
<dependency id="System.CommandLine" version="2.0.0-beta3.22114.*" />
<dependency id="System.ServiceModel.Primitives" version="4.8.*" />
<dependency id="MongoDB.Driver" version="2.15.*" />
<dependency id="System.Threading.RateLimiting" version="7.0.0" />
</dependencies>

</metadata>
<files>
<file src="bin\Release\net6.0\Beamable.*.dll" target="lib\net6.0" />
<file src="bin\Release\net6.0\BeamableMicroserviceBase.dll" target="lib\net6.0" />
<file src="bin\Release\net6.0\UnityEngine.dll" target="lib\net6.0" />
<file src="bin\Release\net7.0\Beamable.*.dll" target="lib\net7.0" />
<file src="bin\Release\net7.0\BeamableMicroserviceBase.dll" target="lib\net7.0" />
<file src="bin\Release\net7.0\UnityEngine.dll" target="lib\net7.0" />
</files>
</package>
21 changes: 18 additions & 3 deletions microservice/microservice/baseImageDocs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions microservice/microservice/microservice.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@

<DefineConstants>DB_MICROSERVICE;DISABLE_BEAMABLE_ASYNCMETHODBUILDER;BEAMABLE_IGNORE_MONGO_MOCKS</DefineConstants>

<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>

<AssemblyName>BeamableMicroserviceBase</AssemblyName>

<LangVersion>10</LangVersion>
<LangVersion>11</LangVersion>



Expand All @@ -40,17 +40,17 @@

<PackageReference Include="LoxSmoke.DocXml" Version="3.4.*" />

<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="6.0.0-preview.6.21352.12" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="7.0.0" />

<PackageReference Include="Microsoft.OpenApi" Version="1.2.*" />
<PackageReference Include="Microsoft.OpenApi" Version="1.4.5" />

<PackageReference Include="Newtonsoft.Json" Version="12.0.*" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />

<PackageReference Include="Serilog" Version="2.10.*" />
<PackageReference Include="Serilog" Version="2.12.0" />

<PackageReference Include="Serilog.Formatting.Compact" Version="1.1.*" />

<PackageReference Include="Serilog.Sinks.Console" Version="3.1.*" />
<PackageReference Include="Serilog.Sinks.Console" Version="4.1.0" />

<PackageReference Include="System.CommandLine" Version="2.0.0-beta3.22114.*" />

Expand Down
2 changes: 1 addition & 1 deletion microservice/microserviceTests/microserviceTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<Company>Beamable</Company>

<DefineConstants>DB_MICROSERVICE;DISABLE_BEAMABLE_ASYNCMETHODBUILDER</DefineConstants>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<AssemblyName>BeamableMicroserviceBaseTests</AssemblyName>
<LangVersion>10</LangVersion>
<OutputType>Library</OutputType>
Expand Down
4 changes: 2 additions & 2 deletions microservice/unityEngineStubs/unityenginestubs.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
<Authors>Beamable Team</Authors>
<Company>Beamable</Company>

<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<AssemblyName>UnityEngine</AssemblyName>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="12.0.1" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
</ItemGroup>

</Project>