Apparently the default target for copying down .dll.refresh files does in
C:\Program Files\MSBuild\Microsoft\WebDeployment\v10.0
this for its copy inside the _ResolveReferences target:
<Copy SourceFiles="@(References->'%(FullPath)')" DestinationFolder="$(_FullSourceWebDir)\Bin\" Condition="!Exists('%(References.Identity)')" ContinueOnError="true" SkipUnchangedFiles="true" Retries="$(CopyRetryCount)" RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"/>
and References.Identity resolves to the source identity, not the target identity. So if the source exists it will not copy.
To work around it, and in case in some other usages for this target need this functionality I added a custom beforebuild override in my .wdproj file:
<Target Name="BeforeBuild"> <Message Text="Doing custom BeforeBuild" /> <Copy SourceFiles="@(References->'%(FullPath)')" DestinationFolder="$(_FullSourceWebDir)\Bin\" ContinueOnError="true" SkipUnchangedFiles="true" Retries="$(CopyRetryCount)" RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"/> </Target>
This was exactly the thing I was looking for, thank you so much! :-)
ReplyDelete