Articles :: View

Visual Studio Target AfterBuild

  <Target Name="AfterBuild">
    <GetAssemblyIdentity AssemblyFiles="..\MyApp\MyApp\bin\$(Configuration)\MyApp.exe">
      <Output TaskParameter="Assemblies" ItemName="AssemblyVersion" />
    </GetAssemblyIdentity>
    <Exec Command="Version.bat %(AssemblyVersion.Version)" />
    <Copy SourceFiles=".\bin\$(Configuration)\$(OutputName).exe" DestinationFiles=".\bin\$(Configuration)\MyApp.%(AssemblyVersion.Version).exe" />
    <Delete Files=".\bin\$(Configuration)\$(OutputName).exe" />
  </Target>


Comments

Add a comment!

    • #18 2013-12-02 21:33:22 reply
      Fixed formatting