Remove pdb, xml of dll files, merge dlls into exe

<Target Name="AfterBuild" Condition="'$(Configuration)' == 'Release'">

    <!--
    <Delete Files="$(OutputPath)Elasticsearch.Net.pdb" />
    <Delete Files="$(OutputPath)Nest.pdb" />
    -->

    <!--
    <ItemGroup>
      <FilesToDelete Include="$(OutputPath)*.pdb"/>
      <FilesToDelete Include="$(OutputPath)*.xml"/>
    </ItemGroup>
    <Message Text="Cleaningup: @(FilesToDelete, ', ')" Importance="High" />
    <Delete Files="@(FilesToDelete)" />
    -->
    <ConvertToAbsolutePath Paths="$(OutputPath)">
      <Output TaskParameter="AbsolutePaths" PropertyName="OutputFullPath"/>
    </ConvertToAbsolutePath>
    <ItemGroup>
      <MergeAssemblies Include="$(OutputPath)Recreate.exe" />
      <MergeAssemblies Include="$(OutputPath)Elasticsearch.Net.dll" />
      <MergeAssemblies Include="$(OutputPath)Nest.dll" />
      <MergeAssemblies Include="$(OutputPath)Newtonsoft.Json.dll" />
    </ItemGroup>
    <PropertyGroup>
      <OutputAssembly>$(OutputFullPath)Recreate.exe</OutputAssembly>
      <Merger>$(SolutionDir)packages\ILMerge.2.14.1208\tools\ILMerge.exe</Merger>
    </PropertyGroup>
    <Message Text="Merge -> $(OutputAssembly)" Importance="High" />
    <Message Text="         &quot;$(Merger)&quot; /out:&quot;$(OutputAssembly)&quot; @(MergeAssemblies->'&quot;%(FullPath)&quot;', ' ')" Importance="High" />
    <Exec Command="&quot;$(Merger)&quot; /out:&quot;$(OutputAssembly)&quot; @(MergeAssemblies->'&quot;%(FullPath)&quot;', ' ')" />
    <ItemGroup>
      <FilesToDelete Include="$(OutputPath)*.pdb"/>
      <FilesToDelete Include="$(OutputPath)*.xml"/>
      <FilesToDelete Include="$(OutputPath)*.dll"/>
    </ItemGroup>
    <Message Text="Cleanup -> @(FilesToDelete, ', ')" Importance="High" />
    <Delete Files="@(FilesToDelete)" />
  </Target>

Force NuGet package update before build

<Target Name="BeforeBuild" Condition="Exists('$(SolutionDir)packages\OctoPack.3.0.60\tools\NuGet.exe')">
  <Exec Command="&quot;$(SolutionDir)packages\OctoPack.3.0.60\tools\NuGet.exe&quot; update -Source &quot;http://tc.rabota.local/httpAuth/app/nuget/v1/FeedService.svc/&quot; -Id &quot;CVBuilder.Templates&quot; -NonInteractive &quot;$(MSBuildProjectDirectory)\packages.config&quot;" />
  </Target>