139 lines
6.0 KiB
XML
139 lines
6.0 KiB
XML
<Project Sdk="Microsoft.NET.Sdk">
|
|
<Import Project="..\Directory.Version.props" />
|
|
<PropertyGroup>
|
|
<TargetFramework>net9.0</TargetFramework>
|
|
<Nullable>enable</Nullable>
|
|
<LangVersion>latest</LangVersion>
|
|
<AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault>
|
|
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
|
|
<Company>Cowain Zhusenlin</Company>
|
|
<Product>Cowain WCS</Product>
|
|
<!-- 避免自动添加 git 修订号(.NET 8+ 需注意) -->
|
|
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
|
|
</PropertyGroup>
|
|
|
|
<ItemGroup>
|
|
<AvaloniaResource Include="Assets\**" />
|
|
<Folder Include="Configs\DB\" />
|
|
<Folder Include="Migrations\" />
|
|
<Folder Include="Plugins\" />
|
|
</ItemGroup>
|
|
|
|
<ItemGroup>
|
|
<PackageReference Include="Fody">
|
|
<PrivateAssets>all</PrivateAssets>
|
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
|
</PackageReference>
|
|
<PackageReference Include="MethodBoundaryAspect.Fody" />
|
|
<PackageReference Include="Avalonia" />
|
|
<PackageReference Include="Avalonia.Desktop" />
|
|
<PackageReference Include="Avalonia.Controls.ItemsRepeater" />
|
|
<PackageReference Include="Microsoft.Extensions.Hosting" />
|
|
<PackageReference Include="NetSparkleUpdater.SparkleUpdater" />
|
|
<PackageReference Include="NetSparkleUpdater.UI.Avalonia" />
|
|
<PackageReference Include="NodifyAvalonia" />
|
|
<PackageReference Include="Avalonia.Themes.Fluent" />
|
|
<PackageReference Include="Avalonia.Fonts.Inter" />
|
|
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
|
|
<PackageReference Include="Avalonia.Diagnostics">
|
|
<IncludeAssets Condition="'$(Configuration)' != 'Debug'">None</IncludeAssets>
|
|
<PrivateAssets Condition="'$(Configuration)' != 'Debug'">All</PrivateAssets>
|
|
</PackageReference>
|
|
<PackageReference Include="CommunityToolkit.Mvvm" />
|
|
<PackageReference Include="Semi.Avalonia" />
|
|
<PackageReference Include="Semi.Avalonia.ColorPicker" />
|
|
<PackageReference Include="Semi.Avalonia.DataGrid" />
|
|
<PackageReference Include="Irihi.Ursa" />
|
|
<PackageReference Include="Irihi.Ursa.Themes.Semi" />
|
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Design">
|
|
<PrivateAssets>all</PrivateAssets>
|
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
|
</PackageReference>
|
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" />
|
|
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" />
|
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools">
|
|
<PrivateAssets>all</PrivateAssets>
|
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
|
</PackageReference>
|
|
<PackageReference Include="Microsoft.Extensions.Configuration" />
|
|
<PackageReference Include="Microsoft.Extensions.Configuration.Json" />
|
|
<PackageReference Include="Microsoft.Extensions.DependencyInjection" />
|
|
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" />
|
|
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" />
|
|
<PackageReference Include="Serilog" />
|
|
<PackageReference Include="Serilog.Extensions.Hosting" />
|
|
<PackageReference Include="Serilog.Settings.Configuration" />
|
|
<PackageReference Include="Serilog.Sinks.File" />
|
|
<PackageReference Include="Serilog.Sinks.MSSqlServer" />
|
|
<PackageReference Include="Serilog.Sinks.MySQL" />
|
|
<PackageReference Include="Serilog.Sinks.PostgreSQL" />
|
|
<PackageReference Include="Serilog.Sinks.SQLite" />
|
|
<PackageReference Include="Xaml.Behaviors.Avalonia" />
|
|
<PackageReference Include="Xaml.Behaviors.Interactivity" />
|
|
<!--<PackageReference Include="HslCommunication" />-->
|
|
<!--<PackageReference Include="OpcUaHelper" />-->
|
|
</ItemGroup>
|
|
|
|
<ItemGroup>
|
|
<ProjectReference Include="..\Cowain.Base\Cowain.Base.csproj" />
|
|
</ItemGroup>
|
|
|
|
<!-- 定义需要复制的文件 -->
|
|
<ItemGroup>
|
|
<None Include="Configs\**\*.*" CopyToOutputDirectory="PreserveNewest" CopyToPublishDirectory="PreserveNewest" />
|
|
<None Include="Plugins\**\*.*" CopyToOutputDirectory="PreserveNewest" CopyToPublishDirectory="PreserveNewest" />
|
|
</ItemGroup>
|
|
<ItemGroup>
|
|
<AvaloniaXaml Remove="Converters\**" />
|
|
<Compile Remove="Converters\**" />
|
|
<EmbeddedResource Remove="Converters\**" />
|
|
<None Remove="Converters\**" />
|
|
</ItemGroup>
|
|
<ItemGroup>
|
|
<AvaloniaXaml Remove="Assets\ToggleSwitch.axaml" />
|
|
<AvaloniaXaml Remove="Assets\_index.axaml" />
|
|
</ItemGroup>
|
|
<ItemGroup>
|
|
<None Remove="Assets\i18n\zh-CN.json" />
|
|
</ItemGroup>
|
|
<ItemGroup>
|
|
<AvaloniaResource Update="Assets\ToggleSwitch.axaml">
|
|
<SubType>Designer</SubType>
|
|
</AvaloniaResource>
|
|
<AvaloniaResource Update="Assets\_index.axaml">
|
|
<SubType>Designer</SubType>
|
|
</AvaloniaResource>
|
|
</ItemGroup>
|
|
<ItemGroup>
|
|
<Compile Update="Views\Admin\RoleMenuSettingView.axaml.cs">
|
|
<DependentUpon>RoleMenuSettingView.axaml</DependentUpon>
|
|
</Compile>
|
|
<Compile Update="Views\Admin\UserEditDialog.axaml.cs">
|
|
<DependentUpon>UserEditDialog.axaml</DependentUpon>
|
|
</Compile>
|
|
<Compile Update="Views\Admin\UserRoleMenuDialog.axaml.cs">
|
|
<DependentUpon>UserRoleMenuDialog.axaml</DependentUpon>
|
|
</Compile>
|
|
</ItemGroup>
|
|
<ItemGroup>
|
|
<None Update="appsettings.json">
|
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
</None>
|
|
<None Update="Configs\menus.json">
|
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
</None>
|
|
</ItemGroup>
|
|
|
|
<!-- 自定义目标:在构建和发布时复制文件并保留目录结构 -->
|
|
<Target Name="CopyResourcesOnBuildAndPublish" AfterTargets="Build;Publish">
|
|
<ItemGroup>
|
|
<ResourcesToCopy Include="\Configs\**\*.*" />
|
|
<ResourcesToCopy Include="\Plugins\**\*.*" />
|
|
</ItemGroup>
|
|
<Copy SourceFiles="@(ResourcesToCopy)" DestinationFolder="$(OutputPath)\%(RecursiveDir)" SkipUnchangedFiles="true" />
|
|
<Copy SourceFiles="@(ResourcesToCopy)" DestinationFolder="$(PublishDir)\%(RecursiveDir)" SkipUnchangedFiles="true" Condition="'$(PublishDir)' != ''" />
|
|
|
|
</Target>
|
|
|
|
</Project>
|