Skip to content

Commit

Permalink
Build client with net7.0 as Core mod (#120)
Browse files Browse the repository at this point in the history
* Make Client and Shared target net7.0, but also keep net6.0 on Shared for server because we can't bump Server to net7.0 yet because of websocket lib

Also dialing LangVersion for Client up to C# 11
  • Loading branch information
RedFlames authored Feb 28, 2024
1 parent 6b6f31d commit d315bf7
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 16 deletions.
4 changes: 2 additions & 2 deletions CelesteNet.Client/CelesteNet.Client.csproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<LangVersion>9</LangVersion> <!-- FIXME: Figure out why dotnet needs this! -->
<TargetFrameworks>net452</TargetFrameworks>
<LangVersion>11</LangVersion>
<TargetFrameworks>net7.0</TargetFrameworks>
<AssemblyName>CelesteNet.Client</AssemblyName>
<RootNamespace>Celeste.Mod.CelesteNet.Client</RootNamespace>
<Nullable>disable</Nullable>
Expand Down
2 changes: 1 addition & 1 deletion CelesteNet.Client/CelesteNetClientRC.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public static void Initialize() {

public static void Shutdown() {
Listener?.Abort();
ListenerThread?.Abort();
//ListenerThread?.Abort();
Listener = null;
ListenerThread = null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<LangVersion>9</LangVersion> <!-- FIXME: Figure out why dotnet needs this! -->
<TargetFrameworks>net452;net6.0</TargetFrameworks>
<TargetFrameworks>net6.0</TargetFrameworks>
<AssemblyName>CelesteNet.Server.ChatModule</AssemblyName>
<RootNamespace>Celeste.Mod.CelesteNet.Server.Chat</RootNamespace>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<LangVersion>9</LangVersion> <!-- FIXME: Figure out why dotnet needs this! -->
<TargetFrameworks>net452;net6.0</TargetFrameworks>
<TargetFrameworks>net6.0</TargetFrameworks>
<AssemblyName>CelesteNet.Server.FrontendModule</AssemblyName>
<RootNamespace>Celeste.Mod.CelesteNet.Server.Control</RootNamespace>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion CelesteNet.Server/CelesteNet.Server.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net452;net6.0</TargetFrameworks>
<TargetFrameworks>net6.0</TargetFrameworks>
<AssemblyName>CelesteNet.Server</AssemblyName>
<RootNamespace>Celeste.Mod.CelesteNet.Server</RootNamespace>
<OutputType>Exe</OutputType>
Expand Down
6 changes: 3 additions & 3 deletions CelesteNet.Shared/CelesteNet.Shared.csproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<LangVersion>9</LangVersion> <!-- FIXME: Figure out why dotnet needs this! -->
<TargetFrameworks>net452;net6.0</TargetFrameworks>
<LangVersion>9</LangVersion>
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
<AssemblyName>CelesteNet.Shared</AssemblyName>
<RootNamespace>Celeste.Mod.CelesteNet</RootNamespace>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion PublishClient.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Remove-Item -Recurse -Path PubClient
Remove-Item -Path CelesteNet.Client.zip
New-Item -ItemType directory -Path PubClient
Copy-Item -Path everest.pubclient.yaml -Destination PubClient/everest.yaml
Copy-Item -Recurse -Path CelesteNet.Client/bin/Release/net452/* -Destination PubClient
Copy-Item -Recurse -Path CelesteNet.Client/bin/Release/net7.0/CelesteNet* -Destination PubClient
Copy-Item -Recurse -Path Dialog -Destination PubClient
Copy-Item -Recurse -Path Graphics -Destination PubClient
Compress-Archive -Path PubClient/* -DestinationPath CelesteNet.Client.zip
3 changes: 2 additions & 1 deletion PublishClient.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ dotnet build CelesteNet.Client -c Release
rm -rf PubClient CelesteNet.Client.zip
mkdir PubClient
cp everest.pubclient.yaml PubClient/everest.yaml
cp -r CelesteNet.Client/bin/Release/net452/* PubClient
cp -r CelesteNet.Client/bin/Release/net7.0/CelesteNet.* PubClient
[ -f PubClient/CelesteNet.Client.deps.json ] && rm PubClient/CelesteNet.Client.deps.json
cp -r Dialog PubClient
cp -r Graphics PubClient
cd PubClient; zip -r ../CelesteNet.Client.zip *
4 changes: 2 additions & 2 deletions everest.pubclient.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
Version: 2.2.2
DLL: CelesteNet.Client.dll
Dependencies:
- Name: Everest
Version: 1.3761.0
- Name: EverestCore
Version: 1.4465.0
6 changes: 3 additions & 3 deletions everest.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
- Name: CelesteNet.Client
Version: 2.2.2
DLL: CelesteNet.Client/bin/Debug/net452/CelesteNet.Client.dll
DLL: CelesteNet.Client/bin/Debug/net7.0/CelesteNet.Client.dll
Dependencies:
- Name: Everest
Version: 1.3761.0
- Name: EverestCore
Version: 1.4465.0

0 comments on commit d315bf7

Please sign in to comment.