Open mheyman opened 6 years ago
Maybe we can add an additional target, as long as not both exist this shouldn't be a problem.
Can't you add a compile target?
From: Michael Heyman notifications@github.com Sent: Friday, April 6, 2018 2:07:46 PM To: baseclass/Contrib.Nuget Cc: Subscribed Subject: [baseclass/Contrib.Nuget] Copy fails until modified AfterTargets in Baseclass.Contrib.Nuget.Output.targets (#51)
The copy wasn't happening for me in VS2017 15.6.4 compiling C++ when I noticed Baseclass.Contrib.Nuget.Output.targets set the copy to occur AfterTargets="Compile". My build has targets InitializeBuildStatus, VcpkgTripletSelection, ClCompile, Link, and FinalizeBuildStatus so AfterTargets="Compile" never happened.
Changing AfterTargets="Compile" to AfterTargets="Link" worked in my case but I suppose a more complex solution will be needed for a targets file that works for different builds.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/baseclass/Contrib.Nuget/issues/51, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ADEJ3rTxp7c8BGEbg-3bcS0xgEtJVqqIks5tl1qRgaJpZM4TJ8nT.
My workaround was to copy the "CopyToOutput" target from Baseclass.Contrib.Nuget.Output.targets, rename and change the AfterTargets
value and put that modified target in the targets file in my nuget package. After doing this, my target executed and the files got copied properly.
I suspect that means that additional targets wont interfere with each other. I suspect they need unique names but I don't know that for sure.
The copy wasn't happening for me in VS2017 15.6.4 compiling C++ when I noticed Baseclass.Contrib.Nuget.Output.targets set the copy to occur
AfterTargets="Compile"
. My build has targets InitializeBuildStatus, VcpkgTripletSelection, ClCompile, Link, and FinalizeBuildStatus soAfterTargets="Compile"
never happened.Changing
AfterTargets="Compile"
toAfterTargets="Link"
worked in my case but I suppose a more complex solution will be needed for a targets file that works for different builds.