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

	<PropertyGroup>
		<OutputType>Exe</OutputType>
		<ImplicitUsings>enable</ImplicitUsings>
		<Nullable>enable</Nullable>
		<Configurations>Debug;Release;Debug BOT;ReleaseVerbose</Configurations>
		<TargetFramework>net8.0</TargetFramework>
		<StartupObject>ScrapWorker.Entry</StartupObject>
		<GenerateDocumentationFile>False</GenerateDocumentationFile>
		<Trimming>full</Trimming>
		<Deterministic>false</Deterministic>
		<NeutralLanguage>en</NeutralLanguage>
	</PropertyGroup>

	<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'" />

	<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug BOT|AnyCPU'">
		<DefineConstants>$(DefineConstants);TEST_BOT</DefineConstants>
	</PropertyGroup>
	<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseVerbose|AnyCPU'">
		<DefineConstants>$(DefineConstants);RELEASE_VERBOSE</DefineConstants>
		<Optimize>True</Optimize>
	</PropertyGroup>
	<ItemGroup>
	  <Compile Remove="Managers\ConsoleManager.cs" />
	</ItemGroup>

	<ItemGroup>
		<ProjectReference Include="..\SteamWorkshopAPI\SteamWorkshop.API.csproj" />
	</ItemGroup>

	<ItemGroup>
		<None Update="Assets\VDF\item_linux.vdf">
			<CopyToOutputDirectory>Always</CopyToOutputDirectory>
		</None>
		<None Update="Assets\VDF\item_windows.vdf">
			<CopyToOutputDirectory>Always</CopyToOutputDirectory>
		</None>
		<None Update="Mod\description.json">
			<CopyToOutputDirectory>Always</CopyToOutputDirectory>
		</None>
		<None Update="Mod\List.json">
			<CopyToOutputDirectory>Always</CopyToOutputDirectory>
		</None>
		<None Update="Mod\preview.jpg">
			<CopyToOutputDirectory>Always</CopyToOutputDirectory>
		</None>
		<None Update="Assets\SecureFiles\priv.key">
			<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
		</None>
		<None Update="Assets\SecureFiles\priv.password">
			<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
		</None>
		<None Update="Assets\Discord\webhook.url">
			<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
		</None>
	</ItemGroup>

	<Target Name="PreBuild" BeforeTargets="PreBuildEvent">
		<PropertyGroup>
			<BuildTimestampMinor>$([System.DateTime]::Now.ToString("yy"))</BuildTimestampMinor>
			<BuildTimestampBuild>$([System.DateTime]::Now.ToString("MMdd"))</BuildTimestampBuild>
			<BuildTimestampRevision>$([System.DateTime]::Now.ToString("HHmm"))</BuildTimestampRevision>
		</PropertyGroup>

		<!-- Set assembly version -->
		<PropertyGroup>
			<AssemblyVersion>1.$(BuildTimestampMinor).$(BuildTimestampBuild).$(BuildTimestampRevision)</AssemblyVersion>
			<FileVersion>1.$(BuildTimestampMinor).$(BuildTimestampBuild).$(BuildTimestampRevision)</FileVersion>
			<InformationalVersion>1.$(BuildTimestampMinor).$(BuildTimestampBuild).$(BuildTimestampRevision)</InformationalVersion>
		</PropertyGroup>
	</Target>

</Project>
