none
Set build event (Post-Build) for new project

    Question

  • There is a script that creates a backup copy of the development folder with the application, depending on the version

    IF NOT EXIST "$(ProjectDir)\bin\OldVersion\$(ConfigurationName)_@(VersionNumber)" (mkdir "$(ProjectDir)\bin\OldVersion\$(ConfigurationName)_@(VersionNumber)" 
    xcopy /E /Y /S  "$(ProjectDir)$(OutDir)*" "$(ProjectDir)bin\OldVersion\$(ConfigurationName)_@(VersionNumber)") 
    echo HELLO, THE ASSEMBLY VERSION IS: @(VersionNumber)

    and for file csproj

    <Target Name="PostBuildMacros">
      <GetAssemblyIdentity AssemblyFiles="$(TargetPath)">
        <Output TaskParameter="Assemblies" ItemName="Targets" />
      </GetAssemblyIdentity>
      <ItemGroup>
        <VersionNumber Include="@(Targets->'%(Version)')"/>
      </ItemGroup>
    </Target>
    How to make the studio itself set the parameters  when creating new project?


    • Edited by Magals Thursday, December 28, 2017 12:17 PM
    Thursday, December 28, 2017 12:12 PM

Answers

  • Hi Magals,

    >>>How to make the studio itself set the parameters  when creating new project?

    To accomplish this, you can use the custom project template.

    https://msdn.microsoft.com/en-us/library/xkh1wxd8.aspx

    When using the custom template to create the new project, the new created project will include the this parameters:

     Hope this helps.


    MSDN Community Support Please remember to click &quot;Mark as Answer&quot; the responses that resolved your issue, and to click &quot;Unmark as Answer&quot; if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by Magals Friday, December 29, 2017 3:01 PM
    Friday, December 29, 2017 5:54 AM

All replies

  • Hi Magals,

    >>>How to make the studio itself set the parameters  when creating new project?

    To accomplish this, you can use the custom project template.

    https://msdn.microsoft.com/en-us/library/xkh1wxd8.aspx

    When using the custom template to create the new project, the new created project will include the this parameters:

     Hope this helps.


    MSDN Community Support Please remember to click &quot;Mark as Answer&quot; the responses that resolved your issue, and to click &quot;Unmark as Answer&quot; if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by Magals Friday, December 29, 2017 3:01 PM
    Friday, December 29, 2017 5:54 AM
  • wow, big tnx
    Friday, December 29, 2017 2:00 PM