mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2025-12-16 14:30:31 +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]
|
||||
|
||||
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:
|
||||
|
||||
8
.github/workflows/publish.yml
vendored
8
.github/workflows/publish.yml
vendored
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
<linker>
|
||||
<!-- All below entries are dedicated to our official STD plugin -->
|
||||
<assembly fullname="System.Collections.Immutable">
|
||||
<type fullname="System.Collections.Immutable.ImmutableDictionary" />
|
||||
<type fullname="System.Collections.Immutable.ImmutableHashSet" />
|
||||
</assembly>
|
||||
|
||||
<assembly fullname="System.Runtime" />
|
||||
</linker>
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
<SignAssembly>true</SignAssembly>
|
||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||
<WarningsAsErrors />
|
||||
<WarningsNotAsErrors>CS8002</WarningsNotAsErrors>
|
||||
<WarningsNotAsErrors>CS8002,IL2026,IL2057,IL2072,IL2075,IL2104</WarningsNotAsErrors>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- Private SNK signing -->
|
||||
@@ -68,21 +68,22 @@
|
||||
<PublicSign>false</PublicSign>
|
||||
</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'">
|
||||
<DebuggerSupport>false</DebuggerSupport>
|
||||
<EnableUnsafeBinaryFormatterSerialization>false</EnableUnsafeBinaryFormatterSerialization>
|
||||
<EnableUnsafeUTF7Encoding>false</EnableUnsafeUTF7Encoding>
|
||||
<EventSourceSupport>false</EventSourceSupport>
|
||||
<HttpActivityPropagationSupport>false</HttpActivityPropagationSupport>
|
||||
<MetadataUpdaterSupport>false</MetadataUpdaterSupport>
|
||||
<TrimMode>link</TrimMode>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(OS)' == 'Windows_NT' OR '$(ASFNetFramework)' != ''">
|
||||
<TargetFrameworks>net5.0;net48</TargetFrameworks>
|
||||
<TargetFrameworks>net6.0;net48</TargetFrameworks>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(OS)' != 'Windows_NT' AND '$(ASFNetFramework)' == ''">
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
</ItemGroup>
|
||||
|
||||
<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.Diagnostics" 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 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 <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 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 <JustArchi@JustArchi.net>" \
|
||||
org.opencontainers.image.authors="JustArchi <JustArchi@JustArchi.net>" \
|
||||
|
||||
Reference in New Issue
Block a user