hoffi/gulp-msbuild

Idea: Providing the assemblies built by the solution as gulp output stream

richard-edwards opened this issue · 3 comments

I know this is possible using an MSBuild targets file but not sure if you can get this from the msbuild exe or not somehow.

In my existing targets file (the one I'm hoping to eliminate by using gulp) I have the following for my build task:

<Target Name="Build">
    <Message Text="Building projects ... " />
    <MSBuild Projects="@(ProjectToBuild)" Targets="Build" Properties='DefineConstants=DINVERSION="$(DINVersion)"'>
        <Output
            TaskParameter="TargetOutputs"
            ItemName="AssembliesBuiltBySolution" />
    </MSBuild>
</Target>

Basically at the end of the build, I get a named output 'AssembliesBuiltBySolution' that I can then copy to another path using this in another target:

<!-- Copy dll's -->
<Copy SourceFiles="@(AssembliesBuiltBySolution)" DestinationFolder="$(TempPath)"  />

I am thinking that in 'gulp thinking', I should be able to just pipe that file list to a destination and that would be it.

Is this even possible do you think?

Hm im not sure, but i think it is not possible, as i don't know how to figure out, where the built assemblies are saved, as you still can specify a non-default Output-Path in the Project file for example.

But maybe this helps you:
You can specify a different Output-Path with a custom property
So you can do: properties: { OutDir: 'path' }

Yeah, I ended up using properties: { OutputPath: config.binPath } and that
threw everything into the path I needed.
Thanks again!

On Tue, Mar 3, 2015 at 12:31 PM, Stefan Hoffmann notifications@github.com
wrote:

Hm im not sure, but i think it is not possible, as i don't know how to
figure out, where the built assemblies are saved, as you still can specify
a non-default Output-Path in the Project file for example.

But maybe this helps you:
You can specify a different Output-Path with a custom property (e.g.
/property:OutDir=[TEMP_PATH])


Reply to this email directly or view it on GitHub
#14 (comment).

Regards,

Richard

No problem :)