Print the name of the current DLL to be used when using MSBuild

This is probably a really stupid MSBuild question, but if I have

<ItemGroup>
<Dll Include="<Path_to_DLLs>\*.dll" />
</ItemGroup>

      

And then

<SomeTarget useFiles=@(Dll)>
....do stuff
</someTarget>

      

What I want to do is output the current item that is passing through @(Dll)

. Basically I want to output the name of the current DLL that is being acted upon.

I think it should be possible and it's probably that simple, but it drives me crazy!

0


source to share


1 answer


Aha Joy of metadata.

When you create each item in MSBuild, it is assigned a specific MetaData.



In this case, I could use% (filename) to get the filename

This is a complete list of well known metadata

+1


source







All Articles