Skip to content

Commit 5362911

Browse files
committed
Fix UI building on Windows 11 - port to .NET 6
1 parent 5f4284a commit 5362911

34 files changed

Lines changed: 250 additions & 29737 deletions

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,3 +179,6 @@ packages/Extended.Wpf.Toolkit.2.2.1/lib/net40/Xceed.Wpf.DataGrid.dll
179179
packages/Extended.Wpf.Toolkit.2.2.1/lib/net40/Xceed.Wpf.Toolkit.dll
180180
packages/Extended.Wpf.Toolkit.2.2.1/lib/net40/zh-Hans/Xceed.Wpf.AvalonDock.resources.dll
181181
packages/Extended.Wpf.Toolkit.2.2.1/tools/install.ps1
182+
183+
.vs/
184+
.tool-versions

BatchImageProcessor.CLI/App.config

Lines changed: 0 additions & 6 deletions
This file was deleted.
Lines changed: 21 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,34 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3-
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
1+
<Project Sdk="Microsoft.NET.Sdk">
42
<PropertyGroup>
5-
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6-
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7-
<ProjectGuid>{293511AC-5E5D-4182-833D-7E802796891C}</ProjectGuid>
3+
<TargetFramework>net6.0-windows</TargetFramework>
84
<OutputType>Exe</OutputType>
9-
<AppDesignerFolder>Properties</AppDesignerFolder>
10-
<RootNamespace>BatchImageProcessor.CLI</RootNamespace>
115
<AssemblyName>bipcli</AssemblyName>
12-
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
13-
<FileAlignment>512</FileAlignment>
6+
<PublishSingleFile>true</PublishSingleFile>
7+
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
8+
<SelfContained>false</SelfContained>
149
</PropertyGroup>
15-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
16-
<PlatformTarget>AnyCPU</PlatformTarget>
17-
<DebugSymbols>true</DebugSymbols>
18-
<DebugType>full</DebugType>
10+
<PropertyGroup>
11+
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
12+
<AssemblyTitle>BatchImageProcessor.CLI</AssemblyTitle>
13+
<Product>BatchImageProcessor.CLI</Product>
14+
<Copyright>Copyright © Sidneys1 2015</Copyright>
15+
<Version>2.0.0</Version>
16+
<AssemblyVersion>2.0.0.0</AssemblyVersion>
17+
<FileVersion>2.0.0.0</FileVersion>
18+
</PropertyGroup>
19+
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
1920
<Optimize>false</Optimize>
20-
<OutputPath>bin\Debug\</OutputPath>
21-
<DefineConstants>DEBUG;TRACE</DefineConstants>
22-
<ErrorReport>prompt</ErrorReport>
23-
<WarningLevel>4</WarningLevel>
2421
</PropertyGroup>
25-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
26-
<PlatformTarget>AnyCPU</PlatformTarget>
27-
<DebugType>pdbonly</DebugType>
22+
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
2823
<Optimize>true</Optimize>
29-
<OutputPath>bin\Release\</OutputPath>
30-
<DefineConstants>TRACE</DefineConstants>
31-
<ErrorReport>prompt</ErrorReport>
32-
<WarningLevel>4</WarningLevel>
24+
<DebugType>none</DebugType>
3325
</PropertyGroup>
3426
<ItemGroup>
35-
<Reference Include="NDesk.Options, Version=0.2.1.0, Culture=neutral, processorArchitecture=MSIL">
36-
<HintPath>..\packages\NDesk.Options.0.2.1\lib\NDesk.Options.dll</HintPath>
37-
<Private>True</Private>
38-
</Reference>
39-
<Reference Include="System" />
40-
<Reference Include="System.Core" />
41-
<Reference Include="System.Drawing" />
42-
<Reference Include="System.Xml.Linq" />
43-
<Reference Include="System.Data.DataSetExtensions" />
44-
<Reference Include="Microsoft.CSharp" />
45-
<Reference Include="System.Data" />
46-
<Reference Include="System.Xml" />
47-
</ItemGroup>
48-
<ItemGroup>
49-
<Compile Include="Program.cs" />
50-
<Compile Include="Properties\AssemblyInfo.cs" />
51-
</ItemGroup>
52-
<ItemGroup>
53-
<None Include="App.config" />
54-
<None Include="packages.config" />
27+
<ProjectReference Include="..\BatchImageProcessor.Model\BatchImageProcessor.Model.csproj" />
5528
</ItemGroup>
5629
<ItemGroup>
57-
<ProjectReference Include="..\BatchImageProcessor.Model\BatchImageProcessor.Model.csproj">
58-
<Project>{7165d238-5543-40fb-a74f-f792368be597}</Project>
59-
<Name>BatchImageProcessor.Model</Name>
60-
</ProjectReference>
30+
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
31+
<PackageReference Include="NDesk.Options.Core" Version="1.2.8" />
32+
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
6133
</ItemGroup>
62-
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
63-
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
64-
Other similar extension points exist, see Microsoft.Common.targets.
65-
<Target Name="BeforeBuild">
66-
</Target>
67-
<Target Name="AfterBuild">
68-
</Target>
69-
-->
7034
</Project>
Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,5 @@
11
using System.Reflection;
22
using System.Runtime.InteropServices;
3-
4-
// General Information about an assembly is controlled through the following
5-
// set of attributes. Change these attribute values to modify the information
6-
// associated with an assembly.
7-
[assembly: AssemblyTitle("BatchImageProcessor.CLI")]
8-
[assembly: AssemblyDescription("")]
9-
[assembly: AssemblyConfiguration("")]
10-
[assembly: AssemblyCompany("")]
11-
[assembly: AssemblyProduct("BatchImageProcessor.CLI")]
12-
[assembly: AssemblyCopyright("Copyright © 2015")]
133
[assembly: AssemblyTrademark("")]
144
[assembly: AssemblyCulture("")]
155

@@ -20,16 +10,3 @@
2010

2111
// The following GUID is for the ID of the typelib if this project is exposed to COM
2212
[assembly: Guid("293511ac-5e5d-4182-833d-7e802796891c")]
23-
24-
// Version information for an assembly consists of the following four values:
25-
//
26-
// Major Version
27-
// Minor Version
28-
// Build Number
29-
// Revision
30-
//
31-
// You can specify all the values or you can default the Build and Revision Numbers
32-
// by using the '*' as shown below:
33-
// [assembly: AssemblyVersion("1.0.*")]
34-
[assembly: AssemblyVersion("1.0.0.0")]
35-
[assembly: AssemblyFileVersion("1.0.0.0")]

BatchImageProcessor.CLI/packages.config

Lines changed: 0 additions & 4 deletions
This file was deleted.
Lines changed: 19 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -1,86 +1,29 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3-
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
1+
<Project Sdk="Microsoft.NET.Sdk">
42
<PropertyGroup>
5-
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6-
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7-
<ProjectGuid>{7165D238-5543-40FB-A74F-F792368BE597}</ProjectGuid>
3+
<TargetFramework>net6.0-windows</TargetFramework>
84
<OutputType>Library</OutputType>
9-
<AppDesignerFolder>Properties</AppDesignerFolder>
10-
<RootNamespace>BatchImageProcessor.Model</RootNamespace>
11-
<AssemblyName>BatchImageProcessor.Model</AssemblyName>
12-
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
13-
<FileAlignment>512</FileAlignment>
5+
<UseWPF>true</UseWPF>
6+
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
147
</PropertyGroup>
15-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
16-
<DebugSymbols>true</DebugSymbols>
17-
<DebugType>full</DebugType>
8+
<PropertyGroup>
9+
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
10+
<AssemblyTitle>BatchImageProcessor.Model</AssemblyTitle>
11+
<Product>BatchImageProcessor.Model</Product>
12+
<Copyright>Copyright © Sidneys1 2024</Copyright>
13+
<Version>2.0.0</Version>
14+
<AssemblyVersion>2.0.0.0</AssemblyVersion>
15+
<FileVersion>2.0.0.0</FileVersion>
16+
</PropertyGroup>
17+
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
1818
<Optimize>false</Optimize>
19-
<OutputPath>bin\Debug\</OutputPath>
20-
<DefineConstants>DEBUG;TRACE</DefineConstants>
21-
<ErrorReport>prompt</ErrorReport>
22-
<WarningLevel>4</WarningLevel>
2319
</PropertyGroup>
24-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
25-
<DebugType>pdbonly</DebugType>
20+
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
2621
<Optimize>true</Optimize>
27-
<OutputPath>bin\Release\</OutputPath>
28-
<DefineConstants>TRACE</DefineConstants>
29-
<ErrorReport>prompt</ErrorReport>
30-
<WarningLevel>4</WarningLevel>
22+
<DebugType>none</DebugType>
23+
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
24+
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
3125
</PropertyGroup>
3226
<ItemGroup>
33-
<Reference Include="PresentationCore" />
34-
<Reference Include="System" />
35-
<Reference Include="System.Core" />
36-
<Reference Include="System.Drawing" />
37-
<Reference Include="System.Xaml" />
38-
<Reference Include="System.Xml.Linq" />
39-
<Reference Include="System.Data.DataSetExtensions" />
40-
<Reference Include="Microsoft.CSharp" />
41-
<Reference Include="System.Data" />
42-
<Reference Include="System.Xml" />
43-
<Reference Include="WindowsBase" />
44-
</ItemGroup>
45-
<ItemGroup>
46-
<Compile Include="File.cs" />
47-
<Compile Include="Folder.cs" />
48-
<Compile Include="Interface\IFile.cs" />
49-
<Compile Include="Interface\IFolderable.cs" />
50-
<Compile Include="Interface\IFolderableHost.cs" />
51-
<Compile Include="Interface\IIoObject.cs" />
52-
<Compile Include="IoObject.cs" />
53-
<Compile Include="Model.cs" />
54-
<Compile Include="Properties\Annotations.cs" />
55-
<Compile Include="Properties\AssemblyInfo.cs" />
56-
<Compile Include="StaticImageUtils.cs" />
57-
<Compile Include="Types\AdjustmentOptions.cs" />
58-
<Compile Include="Types\CropOptions.cs" />
59-
<Compile Include="Types\Enums\Alignment.cs" />
60-
<Compile Include="Types\Enums\ColorType.cs" />
61-
<Compile Include="Types\Enums\Format.cs" />
62-
<Compile Include="Types\Enums\InterpolationMode.cs" />
63-
<Compile Include="Types\Enums\NameType.cs" />
64-
<Compile Include="Types\Enums\RawHighlightMode.cs" />
65-
<Compile Include="Types\Enums\ResizeMode.cs" />
66-
<Compile Include="Types\Enums\Rotation.cs" />
67-
<Compile Include="Types\Enums\WatermarkType.cs" />
68-
<Compile Include="Types\Enums\WhiteBalanceMode.cs" />
69-
<Compile Include="Types\ModelProgressUpdate.cs" />
70-
<Compile Include="Types\OptionSet.cs" />
71-
<Compile Include="Types\OutputOptions.cs" />
72-
<Compile Include="Types\RawOptions.cs" />
73-
<Compile Include="Types\ResizeOptions.cs" />
74-
<Compile Include="Types\WatermarkOptions.cs" />
75-
<Compile Include="Utility\ObjectCopier.cs" />
27+
<PackageReference Include="System.Drawing.Common" Version="8.0.4" />
7628
</ItemGroup>
77-
<ItemGroup />
78-
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
79-
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
80-
Other similar extension points exist, see Microsoft.Common.targets.
81-
<Target Name="BeforeBuild">
82-
</Target>
83-
<Target Name="AfterBuild">
84-
</Target>
85-
-->
8629
</Project>

BatchImageProcessor.Model/File.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
namespace BatchImageProcessor.Model
77
{
8+
// [System.Runtime.Versioning.SupportedOSPlatform("windows")]
89
public class File : IoObject, IFolderable, IFile
910
{
1011
#region Variables

BatchImageProcessor.Model/Model.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
namespace BatchImageProcessor.Model
1616
{
17+
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
1718
public class Model
1819
{
1920
private int _totalImages;
Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,5 @@
11
using System.Reflection;
22
using System.Runtime.InteropServices;
3-
4-
// General Information about an assembly is controlled through the following
5-
// set of attributes. Change these attribute values to modify the information
6-
// associated with an assembly.
7-
[assembly: AssemblyTitle("BatchImageProcessor.Model")]
8-
[assembly: AssemblyDescription("")]
9-
[assembly: AssemblyConfiguration("")]
10-
[assembly: AssemblyCompany("")]
11-
[assembly: AssemblyProduct("BatchImageProcessor.Model")]
12-
[assembly: AssemblyCopyright("Copyright © 2015")]
133
[assembly: AssemblyTrademark("")]
144
[assembly: AssemblyCulture("")]
155

@@ -20,16 +10,3 @@
2010

2111
// The following GUID is for the ID of the typelib if this project is exposed to COM
2212
[assembly: Guid("7165d238-5543-40fb-a74f-f792368be597")]
23-
24-
// Version information for an assembly consists of the following four values:
25-
//
26-
// Major Version
27-
// Minor Version
28-
// Build Number
29-
// Revision
30-
//
31-
// You can specify all the values or you can default the Build and Revision Numbers
32-
// by using the '*' as shown below:
33-
// [assembly: AssemblyVersion("1.0.*")]
34-
[assembly: AssemblyVersion("1.0.0.0")]
35-
[assembly: AssemblyFileVersion("1.0.0.0")]

BatchImageProcessor.Model/StaticImageUtils.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
namespace BatchImageProcessor.Model
1717
{
18+
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
1819
public static class StaticImageUtils
1920
{
2021
public static ImageCodecInfo GetEncoder(ImageFormat format)

0 commit comments

Comments
 (0)