Bookmarks

Yahoo Gmail Google Facebook Delicious Twitter Reddit Stumpleupon Myspace Digg

Search queries

Use of assignment to $[ is deprecated at /usr/local/sbin/apxs line 86. , wwwxxx vim, mysql closing table and opening table, 800c5000, setgid operation not permitted, pciehp: acpi_pciehprm on IBM, WWWXXX.DBF, 078274121, info0a ip, should prodicers of software_based services be held liable or not liable for economic injuries

Links

XODOX
Impressum

#1: MSBuild TargetOutputs Question.

Posted on 2008-04-21 21:23:10 by Satish

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.

Report this message