mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2025-12-17 06:50:29 +00:00
.NET 6.0 (#2388)
* Bump non-source files to net6.0
* Correct .NET 6.0 warnings
* Correct CI
* Correct linking errors
Not much I can do about them ATM
* Remove TrimmerRoots
At least runtime is no longer needed for our STD plugin, not sure about the dictionary
* Correct cc.sh
* Revert "Remove TrimmerRoots"
This reverts commit 11f603d3d6.
* First round of cat & mice game
* Update Directory.Build.props
* Update Startup.cs
* Update Startup.cs
* Update Startup.cs
* Fix new warnings
* Update SDK
* Address netf error
* Update Directory.Packages.props
This commit is contained in:
committed by
GitHub
parent
fd93f0cd03
commit
0eee21360d
6
.github/workflows/ci.yml
vendored
6
.github/workflows/ci.yml
vendored
@@ -3,9 +3,9 @@ name: ASF-ci
|
|||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
|
|
||||||
env:
|
env:
|
||||||
DOTNET_CLI_TELEMETRY_OPTOUT: 1
|
DOTNET_CLI_TELEMETRY_OPTOUT: true
|
||||||
DOTNET_NOLOGO: 1
|
DOTNET_NOLOGO: true
|
||||||
DOTNET_SDK_VERSION: 5.0.x
|
DOTNET_SDK_VERSION: 6.0.x
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
main:
|
main:
|
||||||
|
|||||||
8
.github/workflows/publish.yml
vendored
8
.github/workflows/publish.yml
vendored
@@ -5,10 +5,10 @@ on: [push, pull_request]
|
|||||||
env:
|
env:
|
||||||
ASF_PRIVATE_SNK: ${{ secrets.ASF_PRIVATE_SNK }}
|
ASF_PRIVATE_SNK: ${{ secrets.ASF_PRIVATE_SNK }}
|
||||||
CONFIGURATION: Release
|
CONFIGURATION: Release
|
||||||
DOTNET_CLI_TELEMETRY_OPTOUT: 1
|
DOTNET_CLI_TELEMETRY_OPTOUT: true
|
||||||
DOTNET_NOLOGO: 1
|
DOTNET_NOLOGO: true
|
||||||
DOTNET_SDK_VERSION: 5.0.x
|
DOTNET_SDK_VERSION: 6.0.x
|
||||||
NET_CORE_VERSION: net5.0
|
NET_CORE_VERSION: net6.0
|
||||||
NET_FRAMEWORK_VERSION: net48
|
NET_FRAMEWORK_VERSION: net48
|
||||||
NODE_JS_VERSION: 'lts/*'
|
NODE_JS_VERSION: 'lts/*'
|
||||||
STEAM_TOKEN_DUMPER_NAME: ArchiSteamFarm.OfficialPlugins.SteamTokenDumper
|
STEAM_TOKEN_DUMPER_NAME: ArchiSteamFarm.OfficialPlugins.SteamTokenDumper
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ namespace ArchiSteamFarm.CustomPlugins.ExamplePlugin {
|
|||||||
throw new InvalidOperationException(nameof(response.Content.Link));
|
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
|
#pragma warning disable CA1812 // False positive, the class is used during json deserialization
|
||||||
|
|||||||
@@ -21,6 +21,7 @@
|
|||||||
|
|
||||||
#if NETFRAMEWORK
|
#if NETFRAMEWORK
|
||||||
using JustArchiNET.Madness;
|
using JustArchiNET.Madness;
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Newtonsoft.Json.Converters;
|
using Newtonsoft.Json.Converters;
|
||||||
#endif
|
#endif
|
||||||
using System;
|
using System;
|
||||||
@@ -42,7 +43,6 @@ using Microsoft.AspNetCore.Http;
|
|||||||
using Microsoft.AspNetCore.Http.Headers;
|
using Microsoft.AspNetCore.Http.Headers;
|
||||||
using Microsoft.AspNetCore.HttpOverrides;
|
using Microsoft.AspNetCore.HttpOverrides;
|
||||||
using Microsoft.AspNetCore.Localization;
|
using Microsoft.AspNetCore.Localization;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
|
||||||
using Microsoft.Extensions.Configuration;
|
using Microsoft.Extensions.Configuration;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
using Microsoft.Net.Http.Headers;
|
using Microsoft.Net.Http.Headers;
|
||||||
@@ -354,10 +354,10 @@ namespace ArchiSteamFarm.IPC {
|
|||||||
|
|
||||||
mvc.AddControllersAsServices();
|
mvc.AddControllersAsServices();
|
||||||
|
|
||||||
|
#if NETFRAMEWORK
|
||||||
// Use latest compatibility version for MVC
|
// Use latest compatibility version for MVC
|
||||||
mvc.SetCompatibilityVersion(CompatibilityVersion.Latest);
|
mvc.SetCompatibilityVersion(CompatibilityVersion.Latest);
|
||||||
|
|
||||||
#if NETFRAMEWORK
|
|
||||||
// Add standard formatters
|
// Add standard formatters
|
||||||
mvc.AddFormatterMappings();
|
mvc.AddFormatterMappings();
|
||||||
|
|
||||||
|
|||||||
@@ -20,6 +20,7 @@
|
|||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
#if NETFRAMEWORK
|
#if NETFRAMEWORK
|
||||||
|
using JustArchiNET.Madness;
|
||||||
using File = JustArchiNET.Madness.FileMadness.File;
|
using File = JustArchiNET.Madness.FileMadness.File;
|
||||||
#else
|
#else
|
||||||
using File = System.IO.File;
|
using File = System.IO.File;
|
||||||
@@ -144,10 +145,10 @@ namespace ArchiSteamFarm.NLog {
|
|||||||
StringBuilder loggedMessage = new($"{previousMethodName}() {message} {(echo ? "->" : "<-")} ");
|
StringBuilder loggedMessage = new($"{previousMethodName}() {message} {(echo ? "->" : "<-")} ");
|
||||||
|
|
||||||
if ((chatGroupID != 0) && (chatID != 0)) {
|
if ((chatGroupID != 0) && (chatID != 0)) {
|
||||||
loggedMessage.Append($"{chatGroupID}-{chatID}");
|
loggedMessage.Append(CultureInfo.InvariantCulture, $"{chatGroupID}-{chatID}");
|
||||||
|
|
||||||
if (steamID != 0) {
|
if (steamID != 0) {
|
||||||
loggedMessage.Append($"/{steamID}");
|
loggedMessage.Append(CultureInfo.InvariantCulture, $"/{steamID}");
|
||||||
}
|
}
|
||||||
} else if (steamID != 0) {
|
} else if (steamID != 0) {
|
||||||
loggedMessage.Append(steamID);
|
loggedMessage.Append(steamID);
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
<linker>
|
<linker>
|
||||||
<!-- All below entries are dedicated to our official STD plugin -->
|
|
||||||
<assembly fullname="System.Collections.Immutable">
|
<assembly fullname="System.Collections.Immutable">
|
||||||
<type fullname="System.Collections.Immutable.ImmutableDictionary" />
|
<type fullname="System.Collections.Immutable.ImmutableDictionary" />
|
||||||
|
<type fullname="System.Collections.Immutable.ImmutableHashSet" />
|
||||||
</assembly>
|
</assembly>
|
||||||
|
|
||||||
<assembly fullname="System.Runtime" />
|
|
||||||
</linker>
|
</linker>
|
||||||
|
|||||||
@@ -59,7 +59,7 @@
|
|||||||
<SignAssembly>true</SignAssembly>
|
<SignAssembly>true</SignAssembly>
|
||||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||||
<WarningsAsErrors />
|
<WarningsAsErrors />
|
||||||
<WarningsNotAsErrors>CS8002</WarningsNotAsErrors>
|
<WarningsNotAsErrors>CS8002,IL2026,IL2057,IL2072,IL2075,IL2104</WarningsNotAsErrors>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<!-- Private SNK signing -->
|
<!-- Private SNK signing -->
|
||||||
@@ -68,21 +68,22 @@
|
|||||||
<PublicSign>false</PublicSign>
|
<PublicSign>false</PublicSign>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<!-- Trimming features as specified on https://docs.microsoft.com/dotnet/core/deploying/trimming-options#trimming-framework-library-features and https://github.com/dotnet/runtime/blob/master/docs/workflow/trimming/feature-switches.md -->
|
<!-- Trimming functionality as described on https://docs.microsoft.com/dotnet/core/deploying/trim-self-contained -->
|
||||||
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
|
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
|
||||||
<DebuggerSupport>false</DebuggerSupport>
|
<DebuggerSupport>false</DebuggerSupport>
|
||||||
<EnableUnsafeBinaryFormatterSerialization>false</EnableUnsafeBinaryFormatterSerialization>
|
<EnableUnsafeBinaryFormatterSerialization>false</EnableUnsafeBinaryFormatterSerialization>
|
||||||
<EnableUnsafeUTF7Encoding>false</EnableUnsafeUTF7Encoding>
|
<EnableUnsafeUTF7Encoding>false</EnableUnsafeUTF7Encoding>
|
||||||
<EventSourceSupport>false</EventSourceSupport>
|
<EventSourceSupport>false</EventSourceSupport>
|
||||||
<HttpActivityPropagationSupport>false</HttpActivityPropagationSupport>
|
<HttpActivityPropagationSupport>false</HttpActivityPropagationSupport>
|
||||||
|
<MetadataUpdaterSupport>false</MetadataUpdaterSupport>
|
||||||
<TrimMode>link</TrimMode>
|
<TrimMode>link</TrimMode>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup Condition="'$(OS)' == 'Windows_NT' OR '$(ASFNetFramework)' != ''">
|
<PropertyGroup Condition="'$(OS)' == 'Windows_NT' OR '$(ASFNetFramework)' != ''">
|
||||||
<TargetFrameworks>net5.0;net48</TargetFrameworks>
|
<TargetFrameworks>net6.0;net48</TargetFrameworks>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup Condition="'$(OS)' != 'Windows_NT' AND '$(ASFNetFramework)' == ''">
|
<PropertyGroup Condition="'$(OS)' != 'Windows_NT' AND '$(ASFNetFramework)' == ''">
|
||||||
<TargetFramework>net5.0</TargetFramework>
|
<TargetFramework>net6.0</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup Condition="'$(TargetFramework)' == 'net48'">
|
<ItemGroup Condition="'$(TargetFramework)' == 'net48'">
|
||||||
<PackageVersion Include="JustArchiNET.Madness" Version="1.4.0" />
|
<PackageVersion Include="JustArchiNET.Madness" Version="2.0.0-alpha1" />
|
||||||
<PackageVersion Include="Microsoft.AspNetCore.Cors" Version="2.2.0" />
|
<PackageVersion Include="Microsoft.AspNetCore.Cors" Version="2.2.0" />
|
||||||
<PackageVersion Include="Microsoft.AspNetCore.Diagnostics" Version="2.2.0" />
|
<PackageVersion Include="Microsoft.AspNetCore.Diagnostics" Version="2.2.0" />
|
||||||
<PackageVersion Include="Microsoft.AspNetCore.HttpOverrides" Version="2.2.0" />
|
<PackageVersion Include="Microsoft.AspNetCore.HttpOverrides" Version="2.2.0" />
|
||||||
|
|||||||
14
Dockerfile
14
Dockerfile
@@ -8,14 +8,14 @@ RUN echo "node: $(node --version)" && \
|
|||||||
npm ci --no-progress && \
|
npm ci --no-progress && \
|
||||||
npm run deploy --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 CONFIGURATION=Release
|
||||||
ARG STEAM_TOKEN_DUMPER_TOKEN
|
ARG STEAM_TOKEN_DUMPER_TOKEN
|
||||||
ARG TARGETARCH
|
ARG TARGETARCH
|
||||||
ARG TARGETOS
|
ARG TARGETOS
|
||||||
ENV DOTNET_CLI_TELEMETRY_OPTOUT 1
|
ENV DOTNET_CLI_TELEMETRY_OPTOUT true
|
||||||
ENV DOTNET_NOLOGO 1
|
ENV DOTNET_NOLOGO true
|
||||||
ENV NET_CORE_VERSION net5.0
|
ENV NET_CORE_VERSION net6.0
|
||||||
ENV STEAM_TOKEN_DUMPER_NAME ArchiSteamFarm.OfficialPlugins.SteamTokenDumper
|
ENV STEAM_TOKEN_DUMPER_NAME ArchiSteamFarm.OfficialPlugins.SteamTokenDumper
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY --from=build-node /app/dist ASF-ui/dist
|
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 "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
|
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 ASF_USER asf
|
||||||
ENV ASPNETCORE_URLS=
|
ENV ASPNETCORE_URLS=
|
||||||
ENV DOTNET_CLI_TELEMETRY_OPTOUT 1
|
ENV DOTNET_CLI_TELEMETRY_OPTOUT true
|
||||||
ENV DOTNET_NOLOGO 1
|
ENV DOTNET_NOLOGO true
|
||||||
|
|
||||||
LABEL maintainer="JustArchi <JustArchi@JustArchi.net>" \
|
LABEL maintainer="JustArchi <JustArchi@JustArchi.net>" \
|
||||||
org.opencontainers.image.authors="JustArchi <JustArchi@JustArchi.net>" \
|
org.opencontainers.image.authors="JustArchi <JustArchi@JustArchi.net>" \
|
||||||
|
|||||||
@@ -8,14 +8,14 @@ RUN echo "node: $(node --version)" && \
|
|||||||
npm ci --no-progress && \
|
npm ci --no-progress && \
|
||||||
npm run deploy --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 CONFIGURATION=Release
|
||||||
ARG STEAM_TOKEN_DUMPER_TOKEN
|
ARG STEAM_TOKEN_DUMPER_TOKEN
|
||||||
ARG TARGETARCH
|
ARG TARGETARCH
|
||||||
ARG TARGETOS
|
ARG TARGETOS
|
||||||
ENV DOTNET_CLI_TELEMETRY_OPTOUT 1
|
ENV DOTNET_CLI_TELEMETRY_OPTOUT true
|
||||||
ENV DOTNET_NOLOGO 1
|
ENV DOTNET_NOLOGO true
|
||||||
ENV NET_CORE_VERSION net5.0
|
ENV NET_CORE_VERSION net6.0
|
||||||
ENV STEAM_TOKEN_DUMPER_NAME ArchiSteamFarm.OfficialPlugins.SteamTokenDumper
|
ENV STEAM_TOKEN_DUMPER_NAME ArchiSteamFarm.OfficialPlugins.SteamTokenDumper
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY --from=build-node /app/dist ASF-ui/dist
|
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 "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
|
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 ASF_USER asf
|
||||||
ENV ASPNETCORE_URLS=
|
ENV ASPNETCORE_URLS=
|
||||||
ENV DOTNET_CLI_TELEMETRY_OPTOUT 1
|
ENV DOTNET_CLI_TELEMETRY_OPTOUT true
|
||||||
ENV DOTNET_NOLOGO 1
|
ENV DOTNET_NOLOGO true
|
||||||
|
|
||||||
LABEL maintainer="JustArchi <JustArchi@JustArchi.net>" \
|
LABEL maintainer="JustArchi <JustArchi@JustArchi.net>" \
|
||||||
org.opencontainers.image.authors="JustArchi <JustArchi@JustArchi.net>" \
|
org.opencontainers.image.authors="JustArchi <JustArchi@JustArchi.net>" \
|
||||||
|
|||||||
2
cc.sh
2
cc.sh
@@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
TARGET_FRAMEWORK="net5.0"
|
TARGET_FRAMEWORK="net6.0"
|
||||||
|
|
||||||
MAIN_PROJECT="ArchiSteamFarm"
|
MAIN_PROJECT="ArchiSteamFarm"
|
||||||
STEAM_TOKEN_DUMPER_NAME="${MAIN_PROJECT}.OfficialPlugins.SteamTokenDumper"
|
STEAM_TOKEN_DUMPER_NAME="${MAIN_PROJECT}.OfficialPlugins.SteamTokenDumper"
|
||||||
|
|||||||
Reference in New Issue
Block a user