Skip to content

Commit

Permalink
Upgrade to .NET 8
Browse files Browse the repository at this point in the history
  • Loading branch information
marcussacana committed Sep 7, 2024
1 parent b558882 commit b4d400c
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 27 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:

- uses: actions/setup-dotnet@v2
with:
dotnet-version: '6.0.x'
dotnet-version: '8.0.x'

# Runs a single command using the runners shell
- name: Building
Expand All @@ -51,7 +51,7 @@ jobs:
sh Build.cmd
- name: Archive production artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: Releases
path: |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0-android</TargetFramework>
<SupportedOSPlatformVersion>23</SupportedOSPlatformVersion>
<TargetFramework>net8.0-android34</TargetFramework>
<Nullable>enable</Nullable>
<ApplicationId>com.marcussacana.DirectPackageInstaller</ApplicationId>
<ApplicationVersion>1</ApplicationVersion>
Expand Down Expand Up @@ -39,9 +38,11 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Avalonia.Android" Version="11.0.10" />
<PackageReference Include="Avalonia.Fonts.Inter" Version="11.0.10" />
<PackageReference Include="Xamarin.AndroidX.Core.SplashScreen" Version="1.0.1.5" />
<PackageReference Include="Avalonia.Android" Version="11.1.3" />
<PackageReference Include="Avalonia.Fonts.Inter" Version="11.1.3" />
<PackageReference Include="CavemanTcp" Version="2.0.2" />
<PackageReference Include="System.Text.Json" Version="8.0.4" />
<PackageReference Include="Xamarin.AndroidX.Core.SplashScreen" Version="1.0.1.11" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<!--Avalonia doesen't support TrimMode=link currently,but we are working on that https://github.com/AvaloniaUI/Avalonia/issues/6892 -->
<TrimMode>copyused</TrimMode>
Expand All @@ -16,9 +16,9 @@
<TrimmableAssembly Include="Avalonia.Themes.Default" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Avalonia.Desktop" Version="11.0.10" />
<PackageReference Include="Avalonia.Desktop" Version="11.1.3" />
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.0.10" />
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.1.3" />
<PackageReference Condition="'$(Configuration)' != 'Debug'" Include="Costura.Fody" Version="5.7.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<LangVersion>latest</LangVersion>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
Expand All @@ -10,19 +10,18 @@
<AvaloniaResource Include="Assets\**" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Avalonia" Version="11.0.10" />
<PackageReference Include="Avalonia.Controls.DataGrid" Version="11.0.10" />
<PackageReference Include="Avalonia.Desktop" Version="11.0.10" />
<PackageReference Include="Avalonia" Version="11.1.3" />
<PackageReference Include="Avalonia.Controls.DataGrid" Version="11.1.3" />
<PackageReference Include="Avalonia.Desktop" Version="11.1.3" />
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.0.10" />
<PackageReference Include="Avalonia.ReactiveUI" Version="11.0.10" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.0.10" />
<PackageReference Include="HtmlAgilityPack" Version="1.11.61" />
<PackageReference Include="Jint" Version="3.0.0" />
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.1.3" />
<PackageReference Include="Avalonia.ReactiveUI" Version="11.1.3" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.1.3" />
<PackageReference Include="HtmlAgilityPack" Version="1.11.65" />
<PackageReference Include="Jint" Version="4.0.2" />
<PackageReference Include="SharpCompress" Version="0.38.0" />
<PackageReference Include="System.Diagnostics.PerformanceCounter" Version="6.0.1" />
<PackageReference Include="System.Management" Version="6.0.0" />
<PackageReference Include="XamlNameReferenceGenerator" Version="1.4.2" />
<PackageReference Include="System.Diagnostics.PerformanceCounter" Version="8.0.0" />
<PackageReference Include="System.Management" Version="8.0.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\HttpServerLite\src\HttpServerLite\HttpServerLite.csproj" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using System.Diagnostics;
using System.Reflection;
using Jint;
using Jint.Native.Object;
Expand All @@ -12,8 +13,8 @@ public static class JSEngine
public static Engine GetEngine(HtmlAgilityPack.HtmlDocument Context)
{
Engine JS = new Engine();
JS.SetValue("Engine", new ObjectWrapper(JS, JS));
JS.SetValue("HTML", new ObjectWrapper(JS, Context));
JS.SetValue("Engine", ObjectWrapper.Create(JS, JS));
JS.SetValue("HTML", ObjectWrapper.Create(JS, Context));
JS.SetValue("DocumentClass", TypeReference.CreateTypeReference(JS, typeof(Document)));
JS.Execute("this.document = new DocumentClass(Engine, HTML);");
return JS;
Expand Down
2 changes: 1 addition & 1 deletion DirectPackageInstaller/global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "6.0.0",
"version": "8.0.0",
"rollForward": "latestMinor"
},
"msbuild-sdks": {
Expand Down
2 changes: 1 addition & 1 deletion HttpServerLite
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "6.0.0",
"version": "8.0.0",
"rollForward": "latestMinor",
"allowPrerelease": true
}
Expand Down

0 comments on commit b4d400c

Please sign in to comment.