Refactor application to remove Windows Forms dependencies and transition to Avalonia UI

- Deleted MainWindow.xaml.cs, which contained the WPF implementation of the main window.
- Updated Program.cs to remove Windows Forms initialization and support only Avalonia UI.
- Removed Windows Forms specific code from ViewModelBase, including control marshalling logic.
This commit is contained in:
MaddoScientisto 2026-05-09 14:04:21 +02:00
commit d6b778a648
16 changed files with 64 additions and 4415 deletions

View file

@ -12,8 +12,6 @@
<PropertyGroup Condition="$([MSBuild]::IsOsPlatform('Windows'))">
<TargetFramework>net10.0-windows</TargetFramework>
<OutputType>WinExe</OutputType>
<UseWindowsForms>true</UseWindowsForms>
<UseWPF>true</UseWPF>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<ApplicationIcon>Logo.ico</ApplicationIcon>
</PropertyGroup>
@ -31,9 +29,7 @@
<PublishReadyToRun Condition="'$(PublishReadyToRun)' == ''">false</PublishReadyToRun>
</PropertyGroup>
<PropertyGroup>
<!-- Keep MinVer package enabled but do NOT let it overwrite AssemblyVersion/FileVersion used at build-time.
This prevents MinVer from injecting a computed version into generated BAML/pack URIs which can cause
WPF to try loading a mismatched assembly identity at runtime. Do a full clean rebuild after this change. -->
<!-- Keep MinVer package enabled but do NOT let it overwrite AssemblyVersion/FileVersion used at build-time. -->
<UpdateVersionProperties>true</UpdateVersionProperties>
<!-- Skip MinVer execution during local builds to avoid environment/runtime-specific failures. -->
<MinVerSkip>true</MinVerSkip>
@ -65,11 +61,9 @@
<PackageReference Include="AIFotoONLUS.Core" Version="0.1.1" />
<PackageReference Include="AutoMapper" Version="16.1.0" />
<PackageReference Include="IconPacks.Avalonia" Version="1.3.1" />
<PackageReference Include="MahApps.Metro" Version="2.4.11" Condition="$([MSBuild]::IsOsPlatform('Windows'))" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="10.0.5" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="10.0.5" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="10.0.5" />
<PackageReference Include="MahApps.Metro.IconPacks" Version="6.2.1" Condition="$([MSBuild]::IsOsPlatform('Windows'))" />
<PackageReference Include="MinVer" Version="7.0.0" PrivateAssets="all" />
<PackageReference Include="Avalonia" Version="11.3.12" />
<PackageReference Include="Avalonia.Desktop" Version="11.3.12" />
@ -81,8 +75,7 @@
</ItemGroup>
<!-- MinVer provides a computed 'Version' property. Do not automatically override AssemblyVersion/FileVersion
with MinVer's computed Version to avoid mismatches embedded into generated XAML/BAML. The explicit
AssemblyVersion/FileVersion at the top of this file will be used for runtime identity. -->
with MinVer's computed Version. The explicit AssemblyVersion/FileVersion at the top of this file will be used for runtime identity. -->
<ItemGroup>
<Compile Update="Properties\Settings.Designer.cs">
<DesignTimeSharedInput>True</DesignTimeSharedInput>
@ -90,11 +83,6 @@
<DependentUpon>Settings.settings</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Update="MainForm.resx">
<DependentUpon>MainForm.cs</DependentUpon>
</EmbeddedResource>
</ItemGroup>
<PropertyGroup />
<!-- No Visual Studio fallback required for MinVer; MinVer integrates with MSBuild during build. -->