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

  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFrameworks>net45;net461;netcoreapp3.1;net5.0;net6.0;net7.0;net8.0;net9.0</TargetFrameworks>
    <AssemblyTitle>星尘代理</AssemblyTitle>
    <Description>星尘，分布式资源调度，部署于每一个节点，连接服务端，支持节点监控、远程发布。</Description>
    <Company>新生命开发团队</Company>
    <Copyright>©2002-2025 NewLife</Copyright>
    <VersionPrefix>3.1</VersionPrefix>
    <VersionSuffix>$([System.DateTime]::Now.ToString(`yyyy.MMdd`))</VersionSuffix>
    <Version>$(VersionPrefix).$(VersionSuffix)</Version>
    <FileVersion>$(Version)</FileVersion>
    <AssemblyVersion>$(VersionPrefix).*</AssemblyVersion>
    <Deterministic>false</Deterministic>
    <OutputPath>..\Bin\Agent</OutputPath>
    <!--<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>-->
    <ImplicitUsings>enable</ImplicitUsings>
    <LangVersion>latest</LangVersion>
    <ApplicationManifest>app.manifest</ApplicationManifest>
    <SignAssembly>True</SignAssembly>
    <AssemblyOriginatorKeyFile>..\Doc\newlife.snk</AssemblyOriginatorKeyFile>
    <IsPackable>False</IsPackable>
    <NoWarn>1701;1702;NU5104;NETSDK1138;CS7035</NoWarn>
  </PropertyGroup>

  <PropertyGroup Condition="'$(TargetFramework)'=='net8.0'">
    <!--<ServerGarbageCollection>true</ServerGarbageCollection>-->
    <!--<GarbageCollectionAdapatationMode>1</GarbageCollectionAdapatationMode>-->
    <!--<PublishAot>true</PublishAot>-->
    <!--<OptimizationPreference>Size</OptimizationPreference>-->
    <!--<InvariantGlobalization>true</InvariantGlobalization>-->
    <!--<StackTraceSupport>false</StackTraceSupport>-->
  </PropertyGroup>

  <ItemGroup>
    <Compile Remove="StarService2.cs" />
  </ItemGroup>

  <ItemGroup>
    <Compile Include="..\Stardust\Managers\ServiceController.cs" Link="Managers\ServiceController.cs" />
    <Compile Include="..\Stardust\Managers\ServiceManager.cs" Link="Managers\ServiceManager.cs" />
  </ItemGroup>
  
  <ItemGroup>
    <RuntimeHostConfigurationOption Include="System.Globalization.Invariant" Value="true" />
  </ItemGroup>

  <ItemGroup>
    <PackageReference Include="NewLife.Agent" Version="10.11.2025.101" />
  </ItemGroup>

  <ItemGroup>
    <ProjectReference Include="..\Stardust\Stardust.csproj" />
  </ItemGroup>

  <ItemGroup>
    <Folder Include="Managers\" />
  </ItemGroup>

</Project>
