I have a .target file, which imports to my project:
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="CreateInstaller">
<Import Project="$(PathToTargetFile)\My.target" />
<Project>
The .target is build by another target:
<Target Name="MyCustomTarget" DependsOnTargets="$(OtherTargets)">
<MSBuild Projects="$(PathToTargetFile)\My.target" />
</Target>
The target MyCustomTarget
is called several time, each time the content of My.target
would be changed. But My.target
seems that not imported anymore rather than the first time. How to resolve this problem?