Reputation: 143
I am trying to package a legacy C++ project with CoApp. The project requires the redistributable .dll's from package are copied to a subdirectory of the $(TargetDir).
I can see the following in the generated MyProj.redist.targets file:
<Target Name="MyProj_redist_AfterBuild" AfterTargets="AfterBuild">
<Copy SourceFiles="$(MSBuildThisFileDirectory)../..//build/native/bin/MyProjFoo.dll" DestinationFolder="$(TargetDir)" SkipUnchangedFiles="true" />
<Copy SourceFiles="$(MSBuildThisFileDirectory)../..//build/native/bin/MyProjBar.dll" DestinationFolder="$(TargetDir)" SkipUnchangedFiles="true" />
</Target>
I need that to be:
<Target Name="MyProj_redist_AfterBuild" AfterTargets="AfterBuild">
<Copy SourceFiles="$(MSBuildThisFileDirectory)../..//build/native/bin/MyProjFoo.dll" DestinationFolder="$(TargetDir)\MyProj" SkipUnchangedFiles="true" />
<Copy SourceFiles="$(MSBuildThisFileDirectory)../..//build/native/bin/MyProjBar.dll" DestinationFolder="$(TargetDir)\MyProj" SkipUnchangedFiles="true" />
</Target>
How do I do this in the .autopkg file?
I have tried modifying the bin rule to use : #add-folder : ::nuget.[redist]targets.[${condition}].CopyToOutput;
Upvotes: 2
Views: 980
Reputation: 143
I found the answer in the CoApp issues list. A feature to do this has been added, but the online documetation has not been updated. See: Issue 27 on CoApp in github
Upvotes: 2