<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <PropertyGroup>

      <Year>$([System.DateTime]::get_now().ToString("yyyy"))</Year>

      <Major>$(Year)</Major>
      <Minor>$([System.DateTime]::get_now().ToString("MM"))</Minor>
      <Build>$([System.DateTime]::get_now().ToString("dd"))</Build>
      <Revision>$([MSBuild]::Divide($([System.DateTime]::get_Now().get_TimeOfDay().get_TotalMinutes()), 2).ToString('F0'))</Revision>

      <Version>$(Major).$(Minor).$(Build).$(Revision)</Version>

      <Suffix></Suffix>

   </PropertyGroup>

   <Target Name="DeleteStaleFiles" BeforeTargets="Build">
      <ItemGroup>
         <StaleFiles Include="$(OutDir)..*.nupkg" />
      </ItemGroup>
      <Message Text="Deleting Stale Files: @(StaleFiles, '%0A')" Condition="'@(StaleFiles-&gt;Count())' &gt; 0" />
      <Delete Files="@(StaleFiles)" />
   </Target>

   <Target Name="PostBuild" AfterTargets="Pack">
      <MakeDir Directories="$(SolutionDir)Nuget\SolutionPackages" Condition="!Exists('$(SolutionDir)\Nuget\SolutionPackages')" />
      <Exec Command="dotnet nuget push --source &quot;SolutionLocalSource&quot; $(OutDir)..\*.nupkg" />
   </Target>

</Project>