Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Listing contents of a directory using msbuild

Tags:

msbuild

I'm trying to debug an msbuild script that is being run on our TFS build agent. I have no permissions to the build agent server.

Is there a way I can add some debugging to my msbuild script ("Message" or similar) to output a listing of all the files in a given directory?

like image 288
Jonathan Moffatt Avatar asked Oct 16 '25 18:10

Jonathan Moffatt


1 Answers

Hope this helps to list all the files in the folder where the MSBuild files are there recursively:

<Target Name="Listing">
    <ItemGroup>
      <PackageFiles Include="$(MSBuildProjectDirectory)\**\*.*;"/>
    </ItemGroup>
    <Message Text="%(PackageFiles.FullPath)"/>
</Target>
like image 174
RinoTom Avatar answered Oct 19 '25 09:10

RinoTom