Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade target framework to net9.0 #1154

Merged
merged 1 commit into from
Nov 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
run: dotnet restore

- name: Build
run: dotnet build --no-restore -f net8.0
run: dotnet build --no-restore -f net9.0

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/daily-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
env:
GH_TOKEN: ${{ github.token }}
run: |
PACKAGES_JSON=`dotnet list src/Beutl.Engine/Beutl.Engine.csproj package --framework net8.0 --format json`
PACKAGES_JSON=`dotnet list src/Beutl.Engine/Beutl.Engine.csproj package --framework net9.0 --format json`

#4.9.0.2024
OPENCVSHARP_VERSION=`echo $PACKAGES_JSON | jq -r '.projects[0].frameworks[0].topLevelPackages | map(select(.id == "OpenCvSharp4"))[0].requestedVersion'`
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ jobs:
run: dotnet restore

- name: Build
run: dotnet build --no-restore -f net8.0
run: dotnet build --no-restore -f net9.0

- name: Test
run: dotnet test Beutl.sln --no-build --verbosity normal -f net8.0 --collect:"XPlat Code Coverage" --settings coverlet.runsettings
run: dotnet test Beutl.sln --no-build --verbosity normal -f net9.0 --collect:"XPlat Code Coverage" --settings coverlet.runsettings

- name: Code Coverage Report
uses: irongut/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
env:
GH_TOKEN: ${{ github.token }}
run: |
PACKAGES_JSON=`dotnet list src/Beutl.Engine/Beutl.Engine.csproj package --framework net8.0 --format json`
PACKAGES_JSON=`dotnet list src/Beutl.Engine/Beutl.Engine.csproj package --framework net9.0 --format json`

#4.9.0.2024
OPENCVSHARP_VERSION=`echo $PACKAGES_JSON | jq -r '.projects[0].frameworks[0].topLevelPackages | map(select(.id == "OpenCvSharp4"))[0].requestedVersion'`
Expand Down
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"request": "launch",
"preLaunchTask": "build",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/src/Beutl/bin/Debug/net8.0/Beutl.dll",
"program": "${workspaceFolder}/src/Beutl/bin/Debug/net9.0/Beutl.dll",
"args": [],
"cwd": "${workspaceFolder}/src/Beutl",
// For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console
Expand Down
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
<TargetFrameworks>net8.0;net8.0-windows</TargetFrameworks>
<TargetFrameworks>net9.0;net9.0-windows</TargetFrameworks>
<RuntimeIdentifiers>win-x64;linux-x64;osx-x64;osx-arm64</RuntimeIdentifiers>
<LangVersion>latest</LangVersion>
<Nullable>enable</Nullable>
Expand Down
4 changes: 2 additions & 2 deletions global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "8.0.100",
"version": "9.0.100",
"rollForward": "latestFeature"
}
}
}
2 changes: 1 addition & 1 deletion nukebuild/Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@

output.GlobFiles($"**/{item}*")
.Select(p => (Source: p, Target: mainOutput / output.GetRelativePathTo(p)))
.ForEach(t => CopyFile(t.Source, t.Target));

Check warning on line 121 in nukebuild/Build.cs

View workflow job for this annotation

GitHub Actions / build

'FileSystemTasks.CopyFile(AbsolutePath, AbsolutePath, FileExistsPolicy, bool)' is obsolete: 'Use AbsolutePath.Copy'

Check warning on line 121 in nukebuild/Build.cs

View workflow job for this annotation

GitHub Actions / Analyze (csharp)

'FileSystemTasks.CopyFile(AbsolutePath, AbsolutePath, FileExistsPolicy, bool)' is obsolete: 'Use AbsolutePath.Copy'
}

string[] asmsToCopy =
Expand All @@ -136,7 +136,7 @@
AbsolutePath output = OutputDirectory / asm;
output.GlobFiles($"**/{asm}.*")
.Select(p => (Source: p, Target: mainOutput / output.GetRelativePathTo(p)))
.ForEach(t => CopyFile(t.Source, t.Target));

Check warning on line 139 in nukebuild/Build.cs

View workflow job for this annotation

GitHub Actions / build

'FileSystemTasks.CopyFile(AbsolutePath, AbsolutePath, FileExistsPolicy, bool)' is obsolete: 'Use AbsolutePath.Copy'

Check warning on line 139 in nukebuild/Build.cs

View workflow job for this annotation

GitHub Actions / Analyze (csharp)

'FileSystemTasks.CopyFile(AbsolutePath, AbsolutePath, FileExistsPolicy, bool)' is obsolete: 'Use AbsolutePath.Copy'
}
}
});
Expand Down Expand Up @@ -183,7 +183,7 @@
Target BundleApp => _ => _
.Executes(() =>
{
// dotnet msbuild -t:BundleApp -p:RuntimeIdentifier=osx-arm64 -p:TargetFramework=net8.0 -p:UseAppHost=true -p:SelfContained=true
// dotnet msbuild -t:BundleApp -p:RuntimeIdentifier=osx-arm64 -p:TargetFramework=net9.0 -p:UseAppHost=true -p:SelfContained=true
AbsolutePath directory = SourceDirectory / "Beutl";
AbsolutePath output = OutputDirectory / "AppBundle";
string tfm = GetTFM();
Expand Down
2 changes: 1 addition & 1 deletion nukebuild/_build.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<RootNamespace></RootNamespace>
<NoWarn>CS0649;CS0169</NoWarn>
<NukeRootDirectory>..</NukeRootDirectory>
Expand Down
2 changes: 1 addition & 1 deletion src/Beutl.Api/BeutlApiApplication.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace Beutl.Api;

public class BeutlApiApplication
{
//private const string BaseUrl = "https://localhost:44459";
// private const string BaseUrl = "http://localhost:3000";
private const string BaseUrl = "https://beutl.beditor.net";
private readonly HttpClient _httpClient;
private readonly ReactivePropertySlim<AuthorizedUser?> _authorizedUser = new();
Expand Down
2 changes: 1 addition & 1 deletion tests/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion tests/XamlPreview/XamlPreview.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<Nullable>enable</Nullable>
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
<ApplicationManifest>app.manifest</ApplicationManifest>
Expand Down
Loading