Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > .NET General

Vista - MSBuild TargetOutputs Question.

Reply
 
Old 04-21-2008   #1 (permalink)
Satish


 
 

MSBuild TargetOutputs Question.

I'm rather new to MSBuild. I'm trying to build a project and copy the
build result to a deploy folder. Here is the target I created for this.

<Target Name="BuildModelEvaluator" >
<MSBuild Projects="ModelEvaluator\ModelEvaluator.csproj"
Targets="Rebuild" >
<Output ItemName="ModelAssemblies" TaskParameter="TargetOutputs"/>
</MSBuild>
<Copy SourceFiles="@(ModelAssemblies)"
DestinationFolder="$(OutputFolder)\ModelEvaluator" />
</Target>

Now my problem is that this one copies only the exe file. It does not
copy the dlls of other projects that the exe depends on and also the
config file. My question is aren't those a part of the TargetOutputs as
well or do I have to include those separately?

I added an Itemgroup section into the target as follows

<ItemGroup>
<ModelAssemblies Include="ModelEvaluator\bin\$(Env)\*.dll" />
<ModelAssemblies Include="ModelEvaluator\bin\$(Env)\*.config" />
</ItemGroup>
This seems to work but I'm not sure if this is the right approach.

Thanks.


My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
MSBuild Project files and BuildUri .NET General
MSBuild works everywhere except on one problem machine -Help!!!! .NET General
MSBuild script for Getlatest cource code .NET General
Building a project that uses PowerShell using MSBuild PowerShell
Dual boot system question and family deal discount question Vista General


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46