I have added the following code to a VisualC++ 2010 .vcxproj
file just inside the first <project>
tag:
<PropertyGroup>
<PilotStationDirectory>\..\..\PilotStation\PilotStationApp\$(Configuration)</PilotStationDirectory>
</PropertyGroup>
<ItemGroup>
<MySourceFiles Include="$(TargetName).dll;$(TargetName).lib;$(TargetName).pdb" />
</ItemGroup>
<Target Name="AfterBuild">
<MakeDir Directories="$(PilotStationDirectory)" />
<Copy SourceFiles="@(MySourceFiles)" DestinationFolder="$(PilotStationDirectory)" />
<Message Text="###I AM HERE###" />
</Target>
I have set the "MSBuild project build output/log verbosity" to "Normal". I'm not seeing anything in the log and no files are being copied.
Is there something else that I have to do to make this work?
A project can have only one AfterBuild target. Placement is critical, make sure it appears after any
<Import>
directive so you can be sure it is last and the default one is overridden. Bump up the priority of the<Message>
so you can always see it.Output: