Catalog/imagecatalog/ImageCatalog 2.csproj
Maddo d76e133f18
Some checks failed
Build Windows Avalonia / build (push) Failing after 1m47s
Completely removed GDI
2026-05-28 20:27:05 +02:00

177 lines
No EOL
10 KiB
XML

<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<ProduceReferenceAssembly>False</ProduceReferenceAssembly>
<AvaloniaUseCompiledBindingsByDefault>false</AvaloniaUseCompiledBindingsByDefault>
<!-- Default assembly name for regular builds -->
<AssemblyName>ImageCatalog</AssemblyName>
<LangVersion>default</LangVersion>
<AvaloniaWindowsCrossPublish Condition="'$(AvaloniaWindowsCrossPublish)' == ''">false</AvaloniaWindowsCrossPublish>
<UseLocalAIFotoONLUS Condition="'$(UseLocalAIFotoONLUS)' == '' and Exists('..\..\AIFotoONLUS\src\AIFotoONLUS.Core\AIFotoONLUS.Core.csproj') and '$(GITHUB_ACTIONS)' != 'true' and '$(CI)' != 'true'">true</UseLocalAIFotoONLUS>
<UseLocalAIFotoONLUS Condition="'$(UseLocalAIFotoONLUS)' == ''">false</UseLocalAIFotoONLUS>
</PropertyGroup>
<!-- Windows: net10.0-windows TFM auto-defines WINDOWS preprocessor symbol -->
<PropertyGroup Condition="$([MSBuild]::IsOsPlatform('Windows'))">
<TargetFramework>net10.0-windows</TargetFramework>
<OutputType>WinExe</OutputType>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<ApplicationIcon>Logo.ico</ApplicationIcon>
</PropertyGroup>
<PropertyGroup Condition="!$([MSBuild]::IsOsPlatform('Windows'))">
<TargetFramework>net10.0</TargetFramework>
<OutputType>Exe</OutputType>
</PropertyGroup>
<PropertyGroup Condition="'$(AvaloniaWindowsCrossPublish)' == 'true'">
<OutputType>WinExe</OutputType>
<RuntimeIdentifier Condition="'$(RuntimeIdentifier)' == ''">win-x64</RuntimeIdentifier>
<UseAppHost>true</UseAppHost>
<SelfContained Condition="'$(SelfContained)' == ''">true</SelfContained>
<PublishSingleFile Condition="'$(PublishSingleFile)' == ''">true</PublishSingleFile>
<PublishTrimmed Condition="'$(PublishTrimmed)' == ''">false</PublishTrimmed>
<PublishReadyToRun Condition="'$(PublishReadyToRun)' == ''">false</PublishReadyToRun>
</PropertyGroup>
<PropertyGroup>
<!-- 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>
</PropertyGroup>
<PropertyGroup Condition="$([MSBuild]::IsOsPlatform('Windows')) and '$(UseLocalAIFotoONLUS)' == 'true'">
<LocalAIFotoOutputDir>$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)..\..\AIFotoONLUS\src\AIFotoONLUS.Core\bin\$(Configuration)\net10.0'))</LocalAIFotoOutputDir>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugType>embedded</DebugType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<DebugType>embedded</DebugType>
</PropertyGroup>
<ItemGroup>
<AvaloniaXaml Remove="AvaloniaApp.axaml" />
<AvaloniaXaml Remove="Sorgenti\**" />
<Compile Remove="Sorgenti\**" />
<EmbeddedResource Remove="Sorgenti\**" />
<None Remove="Sorgenti\**" />
<Page Remove="Sorgenti\**" />
</ItemGroup>
<ItemGroup>
<AvaloniaResource Include="AvaloniaApp.axaml" />
</ItemGroup>
<ItemGroup>
<None Update="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Catalog.Communication\Catalog.Communication.csproj" />
<ProjectReference Include="..\MaddoShared\MaddoShared.csproj" />
<ProjectReference Include="..\..\AIFotoONLUS\src\AIFotoONLUS.Core\AIFotoONLUS.Core.csproj" Condition="'$(UseLocalAIFotoONLUS)' == 'true'" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="AIFotoONLUS.Core" Version="0.1.2" Condition="'$(UseLocalAIFotoONLUS)' != 'true'" />
<PackageReference Include="AutoMapper" Version="16.1.1" />
<PackageReference Include="IconPacks.Avalonia" Version="2.0.0" />
<PackageReference Include="System.Configuration.ConfigurationManager" Version="10.0.3" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="10.0.8" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="10.0.8" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="10.0.8" />
<PackageReference Include="MinVer" Version="7.0.0" PrivateAssets="all" />
<PackageReference Include="Avalonia" Version="11.3.13" />
<PackageReference Include="Avalonia.Desktop" Version="11.3.13" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.3.13" />
<PackageReference Include="Avalonia.Controls.DataGrid" Version="11.3.13" />
<PackageReference Include="Microsoft.DotNet.UpgradeAssistant.Extensions.Default.Analyzers" Version="0.4.421302">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>
<!-- MinVer provides a computed 'Version' property. Do not automatically override AssemblyVersion/FileVersion
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>
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
</Compile>
</ItemGroup>
<PropertyGroup />
<!-- No Visual Studio fallback required for MinVer; MinVer integrates with MSBuild during build. -->
<!-- After publish, rename the produced executable to ImageCatalog.<year>.<major>.<minor>.<build>.<revision>.<ext>
The destination extension is taken from the actual produced file (exe or dll).
-->
<Target Name="RenamePublishedExeWithYearAndVersion" AfterTargets="Publish" Condition="'$(PublishDir)' != ''">
<PropertyGroup>
<_PublishYear>$([System.DateTime]::Now.ToString("yyyy"))</_PublishYear>
<!-- Prefer MinVer/MSBuild 'Version', then FileVersion, then AssemblyVersion -->
<_Ver Condition="'$(Version)' != ''">$(Version)</_Ver>
<_Ver Condition="'$(Version)' == ''">$(FileVersion)</_Ver>
<_Ver Condition="'$(_Ver)' == ''">$(AssemblyVersion)</_Ver>
<!-- Normalize to avoid spaces but keep plus signs for pre-release build metadata; replace spaces with underscore -->
<_VerSanitized>$([System.String]::Copy('$(_Ver)'))</_VerSanitized>
<_VerSanitized>$([System.String]::Copy('$(_VerSanitized)').Replace(' ', '_'))</_VerSanitized>
<_NewExeNameBase>ImageCatalog.$(_PublishYear).$(_VerSanitized)</_NewExeNameBase>
</PropertyGroup>
<Message Text="Attempting to find published assembly to rename to $(_NewExeNameBase).* in $(PublishDir)" Importance="High" />
<!-- Candidate locations in order of likelihood -->
<PropertyGroup>
<_Candidate1>$(PublishDir)$(TargetFileName)</_Candidate1>
<_Candidate2>$(PublishDir)$(TargetName)$(TargetExt)</_Candidate2>
<_Candidate3>$(PublishDir)$(TargetName).exe</_Candidate3>
<_Candidate4>$(PublishDir)$(AssemblyName)$(TargetExt)</_Candidate4>
<_Candidate5>$(PublishDir)$(AssemblyName).exe</_Candidate5>
</PropertyGroup>
<!-- Pick the first existing candidate and compute destination using its extension -->
<PropertyGroup Condition="Exists('$(_Candidate1)') and '$(_CandidateFound)' == ''">
<_CandidateFound>$(_Candidate1)</_CandidateFound>
</PropertyGroup>
<PropertyGroup Condition="Exists('$(_Candidate2)') and '$(_CandidateFound)' == ''">
<_CandidateFound>$(_Candidate2)</_CandidateFound>
</PropertyGroup>
<PropertyGroup Condition="Exists('$(_Candidate3)') and '$(_CandidateFound)' == ''">
<_CandidateFound>$(_Candidate3)</_CandidateFound>
</PropertyGroup>
<PropertyGroup Condition="Exists('$(_Candidate4)') and '$(_CandidateFound)' == ''">
<_CandidateFound>$(_Candidate4)</_CandidateFound>
</PropertyGroup>
<PropertyGroup Condition="Exists('$(_Candidate5)') and '$(_CandidateFound)' == ''">
<_CandidateFound>$(_Candidate5)</_CandidateFound>
</PropertyGroup>
<!-- If a candidate was found, compute destination using its extension and perform copy/delete -->
<PropertyGroup Condition="'$(_CandidateFound)' != ''">
<_FoundExt>$([System.IO.Path]::GetExtension('$(_CandidateFound)'))</_FoundExt>
<_DestExe>$(PublishDir)$(_NewExeNameBase)$(_FoundExt)</_DestExe>
</PropertyGroup>
<Message Text="Found candidate: $(_CandidateFound). Renaming to $(_DestExe)" Importance="High" Condition="'$(_CandidateFound)' != ''" />
<Copy SourceFiles="$(_CandidateFound)" DestinationFiles="$(_DestExe)" SkipUnchangedFiles="false" Condition="'$(_CandidateFound)' != ''" />
<Delete Files="$(_CandidateFound)" Condition="'$(_CandidateFound)' != ''" />
</Target>
<Target Name="CopyLocalCudaInferenceLibraries" AfterTargets="Build" Condition="$([MSBuild]::IsOsPlatform('Windows')) and '$(UseLocalAIFotoONLUS)' == 'true'">
<ItemGroup>
<LocalCudaInferenceLibrary Include="$(LocalAIFotoOutputDir)\cublasLt64_11.dll" Condition="Exists('$(LocalAIFotoOutputDir)\cublasLt64_11.dll')" />
<LocalCudaInferenceLibrary Include="$(LocalAIFotoOutputDir)\cudnn_cnn_infer64_8.dll" Condition="Exists('$(LocalAIFotoOutputDir)\cudnn_cnn_infer64_8.dll')" />
</ItemGroup>
<Copy SourceFiles="@(LocalCudaInferenceLibrary)" DestinationFolder="$(TargetDir)" SkipUnchangedFiles="true" Condition="'@(LocalCudaInferenceLibrary)' != ''" />
</Target>
<Target Name="CopyLocalCudaInferenceLibrariesToPublish" AfterTargets="Publish" Condition="$([MSBuild]::IsOsPlatform('Windows')) and '$(UseLocalAIFotoONLUS)' == 'true' and '$(PublishDir)' != ''">
<ItemGroup>
<LocalCudaInferenceLibraryForPublish Include="$(LocalAIFotoOutputDir)\cublasLt64_11.dll" Condition="Exists('$(LocalAIFotoOutputDir)\cublasLt64_11.dll')" />
<LocalCudaInferenceLibraryForPublish Include="$(LocalAIFotoOutputDir)\cudnn_cnn_infer64_8.dll" Condition="Exists('$(LocalAIFotoOutputDir)\cudnn_cnn_infer64_8.dll')" />
</ItemGroup>
<Copy SourceFiles="@(LocalCudaInferenceLibraryForPublish)" DestinationFolder="$(PublishDir)" SkipUnchangedFiles="true" Condition="'@(LocalCudaInferenceLibraryForPublish)' != ''" />
</Target>
</Project>