Skip to content

Commit

Permalink
initial net8.0-windows support
Browse files Browse the repository at this point in the history
  • Loading branch information
majorsilence committed Oct 23, 2024
1 parent d3b905a commit 2367ca9
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 30 deletions.
37 changes: 19 additions & 18 deletions TownSuite.TwainScanner/MainFrame.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion TownSuite.TwainScanner/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion TownSuite.TwainScanner/Twain32.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public Twain32() {
case PlatformID.MacOSX:
throw new NotImplementedException();
default:
Form _window=new Form();
var _window=new System.Windows.Forms.Form();
this._components.Add(_window);
this._hwnd=_window.Handle;
break;
Expand Down
24 changes: 15 additions & 9 deletions TownSuite.TwainScanner/TwainScanner.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<OutputType>WinExe</OutputType>
<RootNamespace>TownSuite.TwainScanner</RootNamespace>
<TargetFramework>net462</TargetFramework>
<TargetFrameworks>net48;net8.0-windows</TargetFrameworks>
<RuntimeIdentifiers>win;win-x86;win-x64</RuntimeIdentifiers>
<AssemblyName>TownSuite.TwainScanner</AssemblyName>
<AssemblyName>TownSuite.TwainScanner</AssemblyName>
<AssemblyTitle>TownSuite.TwainScanner</AssemblyTitle>
<Company>TownSuite</Company>
<Product>TownSuite.TwainScanner</Product>
Expand All @@ -17,6 +17,8 @@
<OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Platforms>AnyCPU;x86</Platforms>
<UseWindowsForms>true</UseWindowsForms>
<ImportWindowsDesktopTargets>true</ImportWindowsDesktopTargets>
</PropertyGroup>
<PropertyGroup>
<AssemblyOriginatorKeyFile />
Expand All @@ -39,13 +41,12 @@
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.CSharp" />
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
<Reference Include="System.Security" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xaml" />
<Reference Include="WindowsBase" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
<Reference Include="System.Security" />
<Reference Include="System.Xaml" />
<Reference Include="WindowsBase" />
</ItemGroup>
<ItemGroup>
<Compile Update="MainFrame.cs">
Expand Down Expand Up @@ -88,4 +89,9 @@
<ItemGroup>
<EmbeddedResource Include="Resources\scanner.bmp" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' != 'net48' ">
<FrameworkReference Include="Microsoft.WindowsDesktop.App" />
<PackageReference Include="System.Drawing.Common" Version="8.0.10" />
<PackageReference Include="System.Windows.Extensions" Version="8.0.0" />
</ItemGroup>
</Project>
4 changes: 3 additions & 1 deletion TownSuite.TwainScanner/TwainScanner_enhanced.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<OutputType>WinExe</OutputType>
<RootNamespace>TownSuite.TwainScanner</RootNamespace>
<TargetFramework>net48</TargetFramework>
<TargetFrameworks>net48;net8.0-windows</TargetFrameworks>
<RuntimeIdentifiers>win;win-x86;win-x64</RuntimeIdentifiers>
<AssemblyName>TownSuite.TwainScanner</AssemblyName>
<AssemblyTitle>TownSuite.TwainScanner</AssemblyTitle>
Expand All @@ -17,6 +17,8 @@
<OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Platforms>AnyCPU;x86</Platforms>
<UseWindowsForms>true</UseWindowsForms>
<ImportWindowsDesktopTargets>true</ImportWindowsDesktopTargets>
<DefineConstants>INCLUDE_TELERIK</DefineConstants>
</PropertyGroup>
<PropertyGroup>
Expand Down

0 comments on commit 2367ca9

Please sign in to comment.