Add 64bit tester and fixed version # in builds by switching to v6 sdk.

This commit is contained in:
Eugene Wang
2023-04-05 07:29:06 -04:00
parent f48c731aad
commit 9d0770a2ef
14 changed files with 72 additions and 17 deletions

View File

@@ -1,4 +1,4 @@
namespace WinForm32
namespace WinFormSample
{
partial class Form1
{

View File

@@ -6,7 +6,7 @@ using System.Diagnostics;
using System.Reflection;
using System.Windows.Forms;
namespace WinForm32
namespace WinFormSample
{
public partial class Form1 : Form
{
@@ -15,7 +15,9 @@ namespace WinForm32
public Form1()
{
InitializeComponent();
Text += TwainPlatform.Is32bit ? " 32bit" : " 64bit";
var libVer = FileVersionInfo.GetVersionInfo(typeof(TwainAppSession).Assembly.Location).FileVersion;
Text += $"{(TwainPlatform.Is32bit ? " 32bit" : " 64bit")} on NTwain {libVer}";
TwainPlatform.PreferLegacyDSM = false;
twain = new TwainAppSession(new WinformMarshaller(this), Assembly.GetExecutingAssembly().Location);

View File

@@ -1,7 +1,7 @@
using System;
using System.Windows.Forms;
namespace WinForm32
namespace WinFormSample
{
internal static class Program
{

View File

@@ -6,10 +6,17 @@
<Nullable>enable</Nullable>
<UseWindowsForms>true</UseWindowsForms>
<PlatformTarget>x86</PlatformTarget>
<RootNamespace>WinFormSample</RootNamespace>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\NTwain\NTwain.csproj" />
</ItemGroup>
<ItemGroup>
<None Update="platforms\qwindows.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
</Project>

Binary file not shown.

View File

@@ -0,0 +1,30 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net6.0-windows</TargetFramework>
<Nullable>enable</Nullable>
<UseWindowsForms>true</UseWindowsForms>
<PlatformTarget>x64</PlatformTarget>
<RootNamespace>WinFormSample</RootNamespace>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\NTwain\NTwain.csproj" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\WinForm32\**\*.cs" Exclude="..\WinForm32\**\obj\**;..\WinForm32\**\bin\**">
<Link>%(RecursiveDir)%(Filename)%(Extension)</Link>
</Compile>
<EmbeddedResource Include="..\WinForm32\**\*.resx" Exclude="..\WinForm32\**\obj\**;..\WinForm32\**\bin\**">
<Link>%(RecursiveDir)%(Filename)%(Extension)</Link>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<None Update="platforms\qwindows.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
</Project>

Binary file not shown.