2026-05-21 16:53:43 +08:00
|
|
|
<Project Sdk="Microsoft.NET.Sdk">
|
|
|
|
|
<UsingTask TaskName="ExpandMacOSPlistVersion" TaskFactory="RoslynCodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.Core.dll">
|
|
|
|
|
<ParameterGroup>
|
|
|
|
|
<InputFile ParameterType="System.String" Required="true"/>
|
|
|
|
|
<OutputFile ParameterType="System.String" Required="true"/>
|
|
|
|
|
<AppVersion ParameterType="System.String" Required="true"/>
|
|
|
|
|
</ParameterGroup>
|
|
|
|
|
<Task>
|
|
|
|
|
<Code Type="Fragment" Language="cs"><![CDATA[
|
|
|
|
|
var token = "$" + "(Version)";
|
|
|
|
|
System.IO.File.WriteAllText(
|
|
|
|
|
OutputFile,
|
|
|
|
|
System.IO.File.ReadAllText(InputFile).Replace(token, AppVersion));
|
|
|
|
|
]]></Code>
|
|
|
|
|
</Task>
|
|
|
|
|
</UsingTask>
|
|
|
|
|
|
2023-01-20 23:08:33 +08:00
|
|
|
<PropertyGroup>
|
|
|
|
|
<OutputType>WinExe</OutputType>
|
2024-07-01 12:42:14 +08:00
|
|
|
<TargetFramework>net8.0</TargetFramework>
|
2026-05-21 16:53:43 +08:00
|
|
|
<Version>1.0.0</Version>
|
2023-01-20 23:08:33 +08:00
|
|
|
<Nullable>enable</Nullable>
|
|
|
|
|
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
|
2025-09-29 01:33:53 +08:00
|
|
|
<ApplicationIcon>..\Semi.Avalonia.Demo\Assets\irihi.ico</ApplicationIcon>
|
2023-02-18 21:54:35 +08:00
|
|
|
<!-- Uncomment below to enable Native AOT compilation-->
|
2024-09-02 20:37:40 +08:00
|
|
|
<!--<PublishAot>true</PublishAot>-->
|
2023-01-20 23:08:33 +08:00
|
|
|
</PropertyGroup>
|
|
|
|
|
|
2024-07-18 16:45:50 +08:00
|
|
|
<PropertyGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0'))">
|
|
|
|
|
<IsTrimmable>true</IsTrimmable>
|
|
|
|
|
<PublishTrimmed>true</PublishTrimmed>
|
|
|
|
|
</PropertyGroup>
|
|
|
|
|
|
2023-01-20 23:08:33 +08:00
|
|
|
<PropertyGroup>
|
|
|
|
|
<ApplicationManifest>app.manifest</ApplicationManifest>
|
|
|
|
|
</PropertyGroup>
|
|
|
|
|
|
2024-07-18 22:16:38 +08:00
|
|
|
<ItemGroup>
|
2024-12-30 14:08:24 +08:00
|
|
|
<TrimmerRootDescriptor Include="Roots.xml"/>
|
2024-07-18 22:16:38 +08:00
|
|
|
</ItemGroup>
|
|
|
|
|
|
2023-01-20 23:08:33 +08:00
|
|
|
<ItemGroup>
|
2025-11-19 15:38:29 +08:00
|
|
|
<PackageReference Include="Avalonia.Desktop"/>
|
2023-01-20 23:08:33 +08:00
|
|
|
</ItemGroup>
|
|
|
|
|
|
|
|
|
|
<ItemGroup>
|
2024-12-30 14:08:24 +08:00
|
|
|
<ProjectReference Include="..\Semi.Avalonia.Demo\Semi.Avalonia.Demo.csproj"/>
|
2023-01-20 23:08:33 +08:00
|
|
|
</ItemGroup>
|
2026-05-21 16:53:43 +08:00
|
|
|
|
|
|
|
|
<Target Name="ExpandMacOSInfoPlist" AfterTargets="Publish">
|
|
|
|
|
<ExpandMacOSPlistVersion
|
|
|
|
|
InputFile="$(MSBuildProjectDirectory)/Info-macOS.plist"
|
|
|
|
|
OutputFile="$(PublishDir)Info-macOS.plist"
|
|
|
|
|
AppVersion="$(Version)"/>
|
|
|
|
|
</Target>
|
2023-01-20 23:08:33 +08:00
|
|
|
</Project>
|