Issue with using MSBuild to build and copy all outputs to a common folder -
we trying write msbuild script build solution , copy on compiled binaries , dependencies on specific output folder. while build script have build , copy on binaries common folder, not getting dependencies copied. has way have used msbuild task build solution , accepting targetoutputs of task itemgroup , iterating on item group copy compiled dlls , exes on common folder. not including dependency dlls gets placed individual bin folder of each project.
<project toolsversion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <propertygroup> <parentsolutionfile /> </propertygroup> <itemgroup> <assemblies include="*.dll, *.exe" /> </itemgroup> <target name="buildall"> <combinepath basepath="$(msbuildprojectdirectory)" paths="source\solutions\xxx.sln"> <output taskparameter="combinedpaths" propertyname="parentsolutionfile" /> </combinepath> <message text="$(parentsolutionfile)" /> <msbuild projects="$(parentsolutionfile)"> <output taskparameter="targetoutputs" itemname="assemblies" /> </msbuild> <message text="%(assemblies.identity)" /> <copy sourcefiles="%(assemblies.identity)" destinationfolder="$(msbuildprojectdirectory)\binary" overwritereadonlyfiles="true" skipunchangedfiles="true" /> </target> what preferred way copy on binaries along necessary dependencies common output folder?
does not overriding outputpath trick alone?
<msbuild projects="$(parentsolutionfile)" properties="outputpath=$(msbuildprojectdirectory)\binary"> <output taskparameter="targetoutputs" itemname="assemblies" /> </msbuild> and leave out copy task alltogether?
Comments
Post a Comment