Skip to content

Commit da08c4d

Browse files
authored
Merge pull request #84 from tksh164/dotnet9
Change target framework to .NET 9
2 parents 168c3d4 + 7aa9f26 commit da08c4d

File tree

4 files changed

+15
-7
lines changed

4 files changed

+15
-7
lines changed

src/alter/Resources/app.manifest

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@
5454

5555
<application xmlns="urn:schemas-microsoft-com:asm.v3">
5656
<windowsSettings>
57-
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true/pm</dpiAware>
5857
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2</dpiAwareness>
5958
<longPathAware xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">true</longPathAware>
6059
</windowsSettings>

src/alter/alter.csproj

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,18 @@
22

33
<PropertyGroup>
44
<OutputType>WinExe</OutputType>
5-
<TargetFramework>net8.0-windows8.0</TargetFramework>
5+
<TargetFramework>net9.0-windows8.0</TargetFramework>
66
<UseWPF>true</UseWPF>
77
<UseWindowsForms>true</UseWindowsForms>
8+
<ApplicationHighDpiMode>PerMonitorV2</ApplicationHighDpiMode>
89
<Nullable>enable</Nullable>
910
<RootNamespace>AlterApp</RootNamespace>
1011
<ApplicationManifest>Resources\app.manifest</ApplicationManifest>
1112
<ApplicationIcon>Resources\alter.ico</ApplicationIcon>
1213
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
1314
<IncludeSourceRevisionInInformationalVersion>true</IncludeSourceRevisionInInformationalVersion>
1415
<PublishReadyToRun>true</PublishReadyToRun>
15-
<NoWarn>$(NoWarn);WFAC010</NoWarn>
16+
<NoWarn>$(NoWarn)</NoWarn>
1617
</PropertyGroup>
1718

1819
<PropertyGroup>

src/msrdcax/AxMsRdpClient.cs

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using MsRdcAx.AxMsTscLib;
1+
using System;
2+
using MsRdcAx.AxMsTscLib;
23

34
namespace MsRdcAx
45
{
@@ -16,8 +17,15 @@ public double GetDesktopScaleFactor()
1617

1718
public void SetRdpExtendedSetting(string propertyName, object propertyValue)
1819
{
19-
var rdpExtendedSettings = (MSTSCLib.IMsRdpExtendedSettings)this.GetOcx();
20-
rdpExtendedSettings.set_Property(propertyName, ref propertyValue);
20+
var rdpExtendedSettings = this.GetOcx() as MSTSCLib.IMsRdpExtendedSettings;
21+
if (rdpExtendedSettings != null)
22+
{
23+
rdpExtendedSettings.set_Property(propertyName, ref propertyValue);
24+
}
25+
else
26+
{
27+
throw new InvalidOperationException($@"Failed to cast to IMsRdpExtendedSettings for property ""{propertyName}"".");
28+
}
2129
}
2230
}
2331
}

src/msrdcax/msrdcax.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net8.0-windows8.0</TargetFramework>
4+
<TargetFramework>net9.0-windows8.0</TargetFramework>
55
<UseWPF>true</UseWPF>
66
<UseWindowsForms>true</UseWindowsForms>
77
<Nullable>enable</Nullable>

0 commit comments

Comments
 (0)