Update net6 refs to net9
This commit is contained in:
parent
0912f690cc
commit
91c578815c
13 changed files with 25 additions and 25 deletions
12
.github/workflows/ci-otapi3.yml
vendored
12
.github/workflows/ci-otapi3.yml
vendored
|
|
@ -39,27 +39,27 @@ jobs:
|
|||
- name: Produce installer
|
||||
run: |
|
||||
cd TShockInstaller
|
||||
dotnet publish -r ${{ matrix.arch }} -f net6.0 -c Release -p:PublishSingleFile=true --self-contained true
|
||||
dotnet publish -r ${{ matrix.arch }} -f net9.0 -c Release -p:PublishSingleFile=true --self-contained true
|
||||
|
||||
- name: Produce build
|
||||
run: |
|
||||
cd TShockLauncher
|
||||
dotnet publish -r ${{ matrix.arch }} -f net6.0 -c Release -p:PublishSingleFile=true --self-contained false
|
||||
dotnet publish -r ${{ matrix.arch }} -f net9.0 -c Release -p:PublishSingleFile=true --self-contained false
|
||||
|
||||
- name: Chmod scripts
|
||||
if: ${{ matrix.arch != 'win-x64' }}
|
||||
run: |
|
||||
chmod +x TShockLauncher/bin/Release/net6.0/${{ matrix.arch }}/publish/TShock.Server
|
||||
chmod +x TShockLauncher/bin/Release/net9.0/${{ matrix.arch }}/publish/TShock.Server
|
||||
|
||||
- name: Copy installer
|
||||
run: |
|
||||
cp TShockInstaller/bin/Release/net6.0/${{ matrix.arch }}/publish/* TShockLauncher/bin/Release/net6.0/${{ matrix.arch }}/publish/
|
||||
cp TShockInstaller/bin/Release/net9.0/${{ matrix.arch }}/publish/* TShockLauncher/bin/Release/net9.0/${{ matrix.arch }}/publish/
|
||||
|
||||
# preserve file perms: https://github.com/actions/upload-artifact#maintaining-file-permissions-and-case-sensitive-files
|
||||
- name: Tarball artifact (non-Windows)
|
||||
if: ${{ matrix.arch != 'win-x64' }}
|
||||
run: |
|
||||
cd TShockLauncher/bin/Release/net6.0/${{ matrix.arch }}/publish/
|
||||
cd TShockLauncher/bin/Release/net9.0/${{ matrix.arch }}/publish/
|
||||
tar -cvf ../../../../../../TShock-Beta-${{ matrix.arch }}-Release.tar *
|
||||
|
||||
- name: Upload artifact (non-Windows)
|
||||
|
|
@ -74,4 +74,4 @@ jobs:
|
|||
if: ${{ matrix.arch == 'win-x64' }}
|
||||
with:
|
||||
name: TShock-Beta-${{ matrix.arch }}-Release
|
||||
path: TShockLauncher/bin/Release/net6.0/${{ matrix.arch }}/publish/
|
||||
path: TShockLauncher/bin/Release/net9.0/${{ matrix.arch }}/publish/
|
||||
|
|
|
|||
6
.vscode/launch.json
vendored
6
.vscode/launch.json
vendored
|
|
@ -9,12 +9,12 @@
|
|||
"type": "coreclr",
|
||||
"request": "launch",
|
||||
"preLaunchTask": "build",
|
||||
"program": "${workspaceFolder}/TShockLauncher/bin/Debug/net6.0/TShock.Run.dll",
|
||||
"program": "${workspaceFolder}/TShockLauncher/bin/Debug/net9.0/TShock.Run.dll",
|
||||
"windows": {
|
||||
"program": "${workspaceFolder}/TShockLauncher/bin/Debug/net6.0/TShock.dll",
|
||||
"program": "${workspaceFolder}/TShockLauncher/bin/Debug/net9.0/TShock.dll",
|
||||
},
|
||||
"args": [],
|
||||
"cwd": "${workspaceFolder}/TShockLauncher/bin/Debug/net6.0/",
|
||||
"cwd": "${workspaceFolder}/TShockLauncher/bin/Debug/net9.0/",
|
||||
"console": "integratedTerminal",
|
||||
"stopAtEntry": false
|
||||
},
|
||||
|
|
|
|||
2
.vscode/tasks.json
vendored
2
.vscode/tasks.json
vendored
|
|
@ -35,7 +35,7 @@
|
|||
{
|
||||
"label": "Remote Publish",
|
||||
"options": {
|
||||
"cwd": "TShockLauncher/bin/Debug/net6.0/linux-arm64"
|
||||
"cwd": "TShockLauncher/bin/Debug/net9.0/linux-arm64"
|
||||
},
|
||||
"command": "C:\\Program Files\\PuTTY\\pscp.exe",
|
||||
"type": "process",
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ RUN \
|
|||
*) echo "Error: Unsupported platform ${TARGETPLATFORM}" && exit 1 \
|
||||
;; \
|
||||
esac && \
|
||||
dotnet publish -o output/ -r "${ARCH}" -v m -f net6.0 -c Release -p:PublishSingleFile=true --self-contained false
|
||||
dotnet publish -o output/ -r "${ARCH}" -v m -f net9.0 -c Release -p:PublishSingleFile=true --self-contained false
|
||||
|
||||
# Runtime image
|
||||
FROM --platform=${TARGETPLATFORM} mcr.microsoft.com/dotnet/runtime:6.0 AS runner
|
||||
|
|
|
|||
|
|
@ -32,9 +32,9 @@ If you want to run the `TShockLauncher` (which runs a server), run:
|
|||
To produce a packaged release (suitable for distribution), run:
|
||||
|
||||
1. `cd TShockLauncher`
|
||||
1. `dotnet publish -r win-x64 -f net6.0 -c Release -p:PublishSingleFile=true --self-contained false`
|
||||
1. `dotnet publish -r win-x64 -f net9.0 -c Release -p:PublishSingleFile=true --self-contained false`
|
||||
|
||||
Note that in this example, you'd be building for `win-x64`. You can build for `win-x64`, `osx-x64`, `linux-x64`, `linux-arm64`, `linux-arm`. Your release will be in the `TShockLauncher/bin/Release/net6.0/` folder under the architecture you specified.
|
||||
Note that in this example, you'd be building for `win-x64`. You can build for `win-x64`, `osx-x64`, `linux-x64`, `linux-arm64`, `linux-arm`. Your release will be in the `TShockLauncher/bin/Release/net9.0/` folder under the architecture you specified.
|
||||
|
||||
### Working with Terraria
|
||||
|
||||
|
|
|
|||
|
|
@ -30,9 +30,9 @@ TShock是为泰拉瑞亚服务器和社区开发的一个工具箱。这个工
|
|||
如果要生成打包后的发行版,运行:
|
||||
|
||||
1. `cd TShockLauncher`
|
||||
1. `dotnet publish -r win-x64 -f net6.0 -c Release -p:PublishSingleFile=true --self-contained false`
|
||||
1. `dotnet publish -r win-x64 -f net9.0 -c Release -p:PublishSingleFile=true --self-contained false`
|
||||
|
||||
注意在这个例子中你将会生成`win-x64`架构的版本。你也可以生成`win-x64`、`osx-x64`、`linux-x64`、`linux-arm64`、`linux-arm`的版本。你可以在`TShockLauncher/bin/Release/net6.0/`文件夹下对应架构的文件夹里找到生成后的发行版。
|
||||
注意在这个例子中你将会生成`win-x64`架构的版本。你也可以生成`win-x64`、`osx-x64`、`linux-x64`、`linux-arm64`、`linux-arm`的版本。你可以在`TShockLauncher/bin/Release/net9.0/`文件夹下对应架构的文件夹里找到生成后的发行版。
|
||||
|
||||
### 跟泰拉瑞亚本体代码交互
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
<PropertyGroup>
|
||||
<OutputType>Library</OutputType>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<GenerateDocumentationFile>True</GenerateDocumentationFile>
|
||||
<!--
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<Version>5.0.0</Version>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<IsPackable>false</IsPackable>
|
||||
</PropertyGroup>
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<AssemblyName>TShock.Server</AssemblyName> <!-- TShock was initially decided on by a community poll, however tshock already exists as a folder and will clash -->
|
||||
|
|
@ -37,15 +37,15 @@
|
|||
|
||||
<!-- the launcher doesnt need the direct OTAPI reference, but since PackageReference[ExcludeFromSingleFile] doesnt work, exclude the assets and copy manually -->
|
||||
<PackageReference Include="OTAPI.Upcoming" Version="3.1.20" ExcludeAssets="all" GeneratePathProperty="true" />
|
||||
<None Include="$(PkgOTAPI_Upcoming)\lib\net6.0\OTAPI.dll">
|
||||
<None Include="$(PkgOTAPI_Upcoming)\lib\net9.0\OTAPI.dll">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
|
||||
</None>
|
||||
<None Include="$(PkgOTAPI_Upcoming)\lib\net6.0\OTAPI.Runtime.dll">
|
||||
<None Include="$(PkgOTAPI_Upcoming)\lib\net9.0\OTAPI.Runtime.dll">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
|
||||
</None>
|
||||
<None Include="$(PkgModFramework)\lib\net6.0\ModFramework.dll">
|
||||
<None Include="$(PkgModFramework)\lib\net9.0\ModFramework.dll">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
|
||||
</None>
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ namespace TShockPluginManager
|
|||
public Nugetter()
|
||||
{
|
||||
FrameworkReducer = new FrameworkReducer();
|
||||
NuGetFramework = NuGetFramework.ParseFolder("net6.0");
|
||||
NuGetFramework = NuGetFramework.ParseFolder("net9.0");
|
||||
Settings = NuGet.Configuration.Settings.LoadDefaultSettings(root: null);
|
||||
PathContext = NuGetPathContext.Create(Settings);
|
||||
PackageSourceProvider = new PackageSourceProvider(Settings);
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
|
|
|||
|
|
@ -9,5 +9,5 @@ build_script:
|
|||
|
||||
dotnet test
|
||||
artifacts:
|
||||
- path: ./TShockLauncher/bin/Debug/net6.0
|
||||
- path: ./TShockLauncher/bin/Debug/net9.0
|
||||
name: TShockAVDebug
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue