diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index f75f90075..bf72f0015 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -3,9 +3,9 @@ name: ASF-ci
on: [push, pull_request]
env:
- DOTNET_CLI_TELEMETRY_OPTOUT: 1
- DOTNET_NOLOGO: 1
- DOTNET_SDK_VERSION: 5.0.x
+ DOTNET_CLI_TELEMETRY_OPTOUT: true
+ DOTNET_NOLOGO: true
+ DOTNET_SDK_VERSION: 6.0.x
jobs:
main:
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
index df6da78f6..0208fa0bb 100644
--- a/.github/workflows/publish.yml
+++ b/.github/workflows/publish.yml
@@ -5,10 +5,10 @@ on: [push, pull_request]
env:
ASF_PRIVATE_SNK: ${{ secrets.ASF_PRIVATE_SNK }}
CONFIGURATION: Release
- DOTNET_CLI_TELEMETRY_OPTOUT: 1
- DOTNET_NOLOGO: 1
- DOTNET_SDK_VERSION: 5.0.x
- NET_CORE_VERSION: net5.0
+ DOTNET_CLI_TELEMETRY_OPTOUT: true
+ DOTNET_NOLOGO: true
+ DOTNET_SDK_VERSION: 6.0.x
+ NET_CORE_VERSION: net6.0
NET_FRAMEWORK_VERSION: net48
NODE_JS_VERSION: 'lts/*'
STEAM_TOKEN_DUMPER_NAME: ArchiSteamFarm.OfficialPlugins.SteamTokenDumper
diff --git a/ArchiSteamFarm.CustomPlugins.ExamplePlugin/CatAPI.cs b/ArchiSteamFarm.CustomPlugins.ExamplePlugin/CatAPI.cs
index 4746e4c5f..ebedfb75d 100644
--- a/ArchiSteamFarm.CustomPlugins.ExamplePlugin/CatAPI.cs
+++ b/ArchiSteamFarm.CustomPlugins.ExamplePlugin/CatAPI.cs
@@ -50,7 +50,7 @@ namespace ArchiSteamFarm.CustomPlugins.ExamplePlugin {
throw new InvalidOperationException(nameof(response.Content.Link));
}
- return Uri.EscapeUriString(response.Content.Link);
+ return Uri.EscapeDataString(response.Content.Link);
}
#pragma warning disable CA1812 // False positive, the class is used during json deserialization
diff --git a/ArchiSteamFarm/IPC/Startup.cs b/ArchiSteamFarm/IPC/Startup.cs
index 33529bebc..bf1b7d05c 100644
--- a/ArchiSteamFarm/IPC/Startup.cs
+++ b/ArchiSteamFarm/IPC/Startup.cs
@@ -21,6 +21,7 @@
#if NETFRAMEWORK
using JustArchiNET.Madness;
+using Microsoft.AspNetCore.Mvc;
using Newtonsoft.Json.Converters;
#endif
using System;
@@ -42,7 +43,6 @@ using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Http.Headers;
using Microsoft.AspNetCore.HttpOverrides;
using Microsoft.AspNetCore.Localization;
-using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Net.Http.Headers;
@@ -354,10 +354,10 @@ namespace ArchiSteamFarm.IPC {
mvc.AddControllersAsServices();
+#if NETFRAMEWORK
// Use latest compatibility version for MVC
mvc.SetCompatibilityVersion(CompatibilityVersion.Latest);
-#if NETFRAMEWORK
// Add standard formatters
mvc.AddFormatterMappings();
diff --git a/ArchiSteamFarm/NLog/ArchiLogger.cs b/ArchiSteamFarm/NLog/ArchiLogger.cs
index 0558b90ac..b8e0be1a2 100644
--- a/ArchiSteamFarm/NLog/ArchiLogger.cs
+++ b/ArchiSteamFarm/NLog/ArchiLogger.cs
@@ -20,6 +20,7 @@
// limitations under the License.
#if NETFRAMEWORK
+using JustArchiNET.Madness;
using File = JustArchiNET.Madness.FileMadness.File;
#else
using File = System.IO.File;
@@ -144,10 +145,10 @@ namespace ArchiSteamFarm.NLog {
StringBuilder loggedMessage = new($"{previousMethodName}() {message} {(echo ? "->" : "<-")} ");
if ((chatGroupID != 0) && (chatID != 0)) {
- loggedMessage.Append($"{chatGroupID}-{chatID}");
+ loggedMessage.Append(CultureInfo.InvariantCulture, $"{chatGroupID}-{chatID}");
if (steamID != 0) {
- loggedMessage.Append($"/{steamID}");
+ loggedMessage.Append(CultureInfo.InvariantCulture, $"/{steamID}");
}
} else if (steamID != 0) {
loggedMessage.Append(steamID);
diff --git a/ArchiSteamFarm/TrimmerRoots.xml b/ArchiSteamFarm/TrimmerRoots.xml
index 5ce336f6d..bbd8e52e8 100644
--- a/ArchiSteamFarm/TrimmerRoots.xml
+++ b/ArchiSteamFarm/TrimmerRoots.xml
@@ -1,8 +1,6 @@
-
+
-
-
diff --git a/Directory.Build.props b/Directory.Build.props
index c24ff8dbf..3060bb723 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -59,7 +59,7 @@
true
true
- CS8002
+ CS8002,IL2026,IL2057,IL2072,IL2075,IL2104
@@ -68,21 +68,22 @@
false
-
+
false
false
false
false
false
+ false
link
- net5.0;net48
+ net6.0;net48
- net5.0
+ net6.0
diff --git a/Directory.Packages.props b/Directory.Packages.props
index 9706f1500..cabed6f1f 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -28,7 +28,7 @@
-
+
diff --git a/Dockerfile b/Dockerfile
index 06969aa76..0d61bdcfa 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -8,14 +8,14 @@ RUN echo "node: $(node --version)" && \
npm ci --no-progress && \
npm run deploy --no-progress
-FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:5.0${IMAGESUFFIX} AS build-dotnet
+FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:6.0${IMAGESUFFIX} AS build-dotnet
ARG CONFIGURATION=Release
ARG STEAM_TOKEN_DUMPER_TOKEN
ARG TARGETARCH
ARG TARGETOS
-ENV DOTNET_CLI_TELEMETRY_OPTOUT 1
-ENV DOTNET_NOLOGO 1
-ENV NET_CORE_VERSION net5.0
+ENV DOTNET_CLI_TELEMETRY_OPTOUT true
+ENV DOTNET_NOLOGO true
+ENV NET_CORE_VERSION net6.0
ENV STEAM_TOKEN_DUMPER_NAME ArchiSteamFarm.OfficialPlugins.SteamTokenDumper
WORKDIR /app
COPY --from=build-node /app/dist ASF-ui/dist
@@ -45,11 +45,11 @@ RUN dotnet --info && \
if [ -d "ArchiSteamFarm/overlay/generic" ]; then cp -pR "ArchiSteamFarm/overlay/generic/"* "out/result"; fi && \
if [ -d "out/${STEAM_TOKEN_DUMPER_NAME}/${NET_CORE_VERSION}" ]; then mkdir -p "out/result/plugins/${STEAM_TOKEN_DUMPER_NAME}"; cp -pR "out/${STEAM_TOKEN_DUMPER_NAME}/${NET_CORE_VERSION}/"* "out/result/plugins/${STEAM_TOKEN_DUMPER_NAME}"; fi
-FROM --platform=$TARGETPLATFORM mcr.microsoft.com/dotnet/aspnet:5.0${IMAGESUFFIX} AS runtime
+FROM --platform=$TARGETPLATFORM mcr.microsoft.com/dotnet/aspnet:6.0${IMAGESUFFIX} AS runtime
ENV ASF_USER asf
ENV ASPNETCORE_URLS=
-ENV DOTNET_CLI_TELEMETRY_OPTOUT 1
-ENV DOTNET_NOLOGO 1
+ENV DOTNET_CLI_TELEMETRY_OPTOUT true
+ENV DOTNET_NOLOGO true
LABEL maintainer="JustArchi " \
org.opencontainers.image.authors="JustArchi " \
diff --git a/Dockerfile.Service b/Dockerfile.Service
index 040fdb468..8c251158b 100644
--- a/Dockerfile.Service
+++ b/Dockerfile.Service
@@ -8,14 +8,14 @@ RUN echo "node: $(node --version)" && \
npm ci --no-progress && \
npm run deploy --no-progress
-FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:5.0${IMAGESUFFIX} AS build-dotnet
+FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:6.0${IMAGESUFFIX} AS build-dotnet
ARG CONFIGURATION=Release
ARG STEAM_TOKEN_DUMPER_TOKEN
ARG TARGETARCH
ARG TARGETOS
-ENV DOTNET_CLI_TELEMETRY_OPTOUT 1
-ENV DOTNET_NOLOGO 1
-ENV NET_CORE_VERSION net5.0
+ENV DOTNET_CLI_TELEMETRY_OPTOUT true
+ENV DOTNET_NOLOGO true
+ENV NET_CORE_VERSION net6.0
ENV STEAM_TOKEN_DUMPER_NAME ArchiSteamFarm.OfficialPlugins.SteamTokenDumper
WORKDIR /app
COPY --from=build-node /app/dist ASF-ui/dist
@@ -46,11 +46,11 @@ RUN dotnet --info && \
if [ -d "ArchiSteamFarm/overlay/${asf_variant}" ]; then cp -pR "ArchiSteamFarm/overlay/${asf_variant}/"* "out/result"; fi && \
if [ -d "out/${STEAM_TOKEN_DUMPER_NAME}/${NET_CORE_VERSION}" ]; then mkdir -p "out/result/plugins/${STEAM_TOKEN_DUMPER_NAME}"; cp -pR "out/${STEAM_TOKEN_DUMPER_NAME}/${NET_CORE_VERSION}/"* "out/result/plugins/${STEAM_TOKEN_DUMPER_NAME}"; fi
-FROM --platform=$TARGETPLATFORM mcr.microsoft.com/dotnet/runtime-deps:5.0${IMAGESUFFIX} AS runtime
+FROM --platform=$TARGETPLATFORM mcr.microsoft.com/dotnet/runtime-deps:6.0${IMAGESUFFIX} AS runtime
ENV ASF_USER asf
ENV ASPNETCORE_URLS=
-ENV DOTNET_CLI_TELEMETRY_OPTOUT 1
-ENV DOTNET_NOLOGO 1
+ENV DOTNET_CLI_TELEMETRY_OPTOUT true
+ENV DOTNET_NOLOGO true
LABEL maintainer="JustArchi " \
org.opencontainers.image.authors="JustArchi " \
diff --git a/cc.sh b/cc.sh
index 3994e2dfb..930747a9a 100755
--- a/cc.sh
+++ b/cc.sh
@@ -1,7 +1,7 @@
#!/usr/bin/env sh
set -eu
-TARGET_FRAMEWORK="net5.0"
+TARGET_FRAMEWORK="net6.0"
MAIN_PROJECT="ArchiSteamFarm"
STEAM_TOKEN_DUMPER_NAME="${MAIN_PROJECT}.OfficialPlugins.SteamTokenDumper"