When one builds a .Net project, the output is copied into an output folder (e.g.: the bin folder); Not only the binaries issued from the project’s source code are copied, but also all the dependencies (file references) marked with the option CopyLocal=True.
For the purpose of a custom Build task (i.e.: when compiling on Team Build) I would like to know how get the list of binaries issued from a build without those dependencies (I may not – and don’t want anyway – to set CopyLocal=False).
My issue is that I didn’t find a clean way to determined this output. The closest solution I have is to loop on the project files, read the AssemblyName and check if there are pdb, xml, resx files foreseen. But still, I am sometimes missing resource files (?) and maybe other outputs as I don’t know all the possible items.
So my question is: do you know any methods/tricks/algorithms to get the list of binaries issued by a Build; i.e. assemblies, satellite assemblies (+ path of their subfolders), pbd, xml (i.e.: documentation) but without the dependencies ?
I have a (maybe a really stupid) idea…
What about using the FileListAbsolute.txt generated in the “obj” folder during the build (on Team Build)? It precisely contains the output (dll, resx, xml, …) of the build, without the dependencies. I can easily retreive it using Build Environment variables (path, etc…) and loop on it to get the names of the files dropped from the “obj” folder into the “bin” folder.