<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <TargetFrameworks>net45;net461;netstandard2.0;netstandard2.1;netcoreapp3.1;net5.0;net6.0;net6.0-windows;net7.0;net7.0-windows;net8.0;net8.0-windows;net9.0;net9.0-windows</TargetFrameworks>
    <AssemblyName>Stardust</AssemblyName>
    <AssemblyTitle>星尘分布式服务核心</AssemblyTitle>
    <Description>星尘，分布式服务框架。节点管理，监控中心，配置中心，发布中心，注册中心</Description>
    <Company>新生命开发团队</Company>
    <Copyright>©2002-2025 NewLife</Copyright>
    <VersionPrefix>3.4</VersionPrefix>
    <VersionSuffix>$([System.DateTime]::Now.ToString(`yyyy.MMdd`))</VersionSuffix>
    <Version>$(VersionPrefix).$(VersionSuffix)</Version>
    <FileVersion>$(Version)</FileVersion>
    <AssemblyVersion>$(VersionPrefix).$([System.DateTime]::Now.ToString(`yyyy.MMdd`))</AssemblyVersion>
    <OutputPath>..\Bin</OutputPath>
    <GenerateDocumentationFile>True</GenerateDocumentationFile>
    <Nullable>enable</Nullable>
    <ImplicitUsings>enable</ImplicitUsings>
    <LangVersion>latest</LangVersion>
    <SignAssembly>True</SignAssembly>
    <AssemblyOriginatorKeyFile>..\Doc\newlife.snk</AssemblyOriginatorKeyFile>
    <NoWarn>1701;1702;NU5104;NU1505;NETSDK1138;CS7035</NoWarn>
    <AnalysisLevel>latest</AnalysisLevel>
    <WarningsAsErrors>CA2007</WarningsAsErrors>
  </PropertyGroup>

  <PropertyGroup>
    <PackageId>NewLife.$(AssemblyName)</PackageId>
    <Authors>$(Company)</Authors>
    <PackageProjectUrl>https://newlifex.com/blood/stardust</PackageProjectUrl>
    <PackageIcon>leaf.png</PackageIcon>
    <RepositoryUrl>https://github.com/NewLifeX/Stardust</RepositoryUrl>
    <RepositoryType>git</RepositoryType>
    <PackageTags>新生命团队;X组件;NewLife;$(AssemblyName)</PackageTags>
    <PackageReleaseNotes>增加网络质量监控</PackageReleaseNotes>
    <PackageLicenseExpression>MIT</PackageLicenseExpression>
    <PublishRepositoryUrl>true</PublishRepositoryUrl>
    <EmbedUntrackedSources>true</EmbedUntrackedSources>
    <IncludeSymbols>true</IncludeSymbols>
    <SymbolPackageFormat>snupkg</SymbolPackageFormat>
    <PackageReadmeFile>Readme.MD</PackageReadmeFile>
  </PropertyGroup>

  <PropertyGroup Condition="'$(TargetFramework)'=='net6.0-windows' or '$(TargetFramework)'=='net7.0-windows' or '$(TargetFramework)'=='net8.0-windows' or '$(TargetFramework)'=='net9.0-windows'">
    <EnableWindowsTargeting>true</EnableWindowsTargeting>
  </PropertyGroup>

  <ItemGroup>
    <Compile Remove="Web\**" />
    <EmbeddedResource Remove="Web\**" />
    <None Remove="Web\**" />
  </ItemGroup>
  <ItemGroup>
    <Using Include="System.Net.Http" />
  </ItemGroup>
  <ItemGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
    <PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1">
      <PrivateAssets>all</PrivateAssets>
      <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
    </PackageReference>
  </ItemGroup>

  <ItemGroup Condition="'$(TargetFramework)'=='net5.0-windows'">
    <FrameworkReference Include="Microsoft.WindowsDesktop.App.WindowsForms" IsImplicitlyDefined="true" TargetingPackVersion="5.0.0" />
  </ItemGroup>
  <ItemGroup Condition="'$(TargetFramework)'=='net6.0-windows'">
    <FrameworkReference Include="Microsoft.WindowsDesktop.App.WindowsForms" IsImplicitlyDefined="true" TargetingPackVersion="6.0.0" />
  </ItemGroup>
  <ItemGroup Condition="'$(TargetFramework)'=='net7.0-windows'">
    <FrameworkReference Include="Microsoft.WindowsDesktop.App.WindowsForms" IsImplicitlyDefined="true" TargetingPackVersion="7.0.0" />
  </ItemGroup>
  <ItemGroup Condition="'$(TargetFramework)'=='net8.0-windows'">
    <FrameworkReference Include="Microsoft.WindowsDesktop.App.WindowsForms" IsImplicitlyDefined="true" TargetingPackVersion="8.0.0" />
  </ItemGroup>
  <ItemGroup Condition="'$(TargetFramework)'=='net9.0-windows'">
    <FrameworkReference Include="Microsoft.WindowsDesktop.App.WindowsForms" IsImplicitlyDefined="true" TargetingPackVersion="9.0.0" />
  </ItemGroup>

  <ItemGroup>
    <Compile Remove="Managers\ServiceController.cs" />
    <Compile Remove="Managers\ServiceManager.cs" />
    <Compile Remove="Models\CommandEventArgs.cs" />
    <Compile Remove="Models\CommandInModel.cs" />
    <Compile Remove="Models\CommandModel.cs" />
    <Compile Remove="Models\CommandReplyModel.cs" />
    <Compile Remove="Models\CommandStatus.cs" />
    <Compile Remove="Models\EventModel.cs" />
    <Compile Remove="Models\TokenModel.cs" />
    <Compile Remove="Models\UpgradeInfo.cs" />
    <Compile Remove="Monitors\AspNetCoreDiagnosticListener.cs" />
    <Compile Remove="Monitors\GrpcDiagnosticListener.cs" />
    <Compile Remove="Monitors\MyBuilder.cs" />
    <Compile Remove="Monitors\MySpan.cs" />
    <Compile Remove="Monitors\MyTraceModel.cs" />
    <Compile Remove="Registry\RegistryClient.cs" />
    <Compile Remove="RpcClient.cs" />
    <Compile Remove="RpcServer.cs" />
    <Compile Remove="Services\CacheService.cs" />
    <Compile Remove="Services\ICommandClient.cs" />
    <Compile Remove="Services\IEventProvider.cs" />
  </ItemGroup>

  <ItemGroup>
    <None Remove="res\md5.txt" />
  </ItemGroup>

  <ItemGroup>
    <Content Include="..\Doc\leaf.png" Link="leaf.png" PackagePath="\" />
  </ItemGroup>

  <ItemGroup>
    <EmbeddedResource Include="res\md5.txt" />
  </ItemGroup>
  <ItemGroup>
    <None Include="..\Readme.MD">
      <Pack>True</Pack>
      <PackagePath>\</PackagePath>
    </None>
  </ItemGroup>

  <ItemGroup>
    <PackageReference Include="NewLife.Remoting" Version="3.4.2025.801" />
  </ItemGroup>
  <ItemGroup>
    <PackageReference Include="NewLife.Core" Version="11.6.2025.801" />
  </ItemGroup>

</Project>
