Files
Semi.Avalonia/demo/Semi.Avalonia.Demo.Desktop/Semi.Avalonia.Demo.Desktop.csproj
T

57 lines
2.0 KiB
XML
Raw Normal View History

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>
<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>
<ApplicationIcon>..\Semi.Avalonia.Demo\Assets\irihi.ico</ApplicationIcon>
<!-- 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>
<ItemGroup>
2024-12-30 14:08:24 +08:00
<TrimmerRootDescriptor Include="Roots.xml"/>
</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>