uniblab icon

Improved Rename output file during build

uniblab | PRO | 02/24/25 11:36:29 PM UTC | 0 ⭐ | 6564 👁️ | Never ⏰ | [MSBuild]
XML |

650 B

|

Source Code

|

0 👍

/

0 👎

<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
    <PropertyGroup>
        <AssemblyName>Foo</AssemblyName>
    </PropertyGroup>
    <ItemGroup>
        <Content Include="LICENSE" CopyToOutputDirectory="Always" />
    </ItemGroup>
 
    <Target Name="RmLicense" AfterTargets="Clean" Condition=" '$(OutDir)' != '' ">
        <Delete ContinueOnError="false"
            Files="$(OutDir)\$(AssemblyName).License.txt"
        />
    </Target>
    <Target Name="MvLicense" AfterTargets="Build" Condition=" '$(OutDir)' != '' ">
        <Move ContinueOnError="false"
            SourceFiles="$(OutDir)\LICENSE"
            DestinationFiles="$(OutDir)\$(AssemblyName).License.txt"
        />
    </Target>
</Project>

Comments

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎

    
        
  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎