Closed muso31 closed 5 years ago
Just to clarify before I dive into this, AdditionalFilesToRemoveFromTarget
only removes files if they aren't going to get published (ie. it's an old, since-renamed, assembly). It also won't work with publishUrl being a URL.
Based on the above, do you think the feature itself is still an issue?
Providing AdditionalFilesToRemoveFromTarget is a webroot clean... I've got the publishUrl set to a path. If I rename a binary in the webroot and then publish with hpp the assembly still exists in the webroot even though it should be caught in the wildcard in the publish profile
Example is...
Path config: https://github.com/muso31/Helixbase/blob/master/src/Website/code/Properties/PublishProfiles/Local.pubxml#L12
Unless it should be *Website\bin\Helixbase..dll** I believe it could be a defect
No, bin\Helixbase.*.dll
is correct. Sounds like a bug.
(I'm assuming you haven't run your rename script, right? That wouldn't catch the old file name)
Yep all vanilla, no rename!
I'll take a look. Btw, if you set define a EnablePackageProcessLoggingAndAssert
property as true
, the files to be removed will be emitted to AdditionalFilesToRemoveFromPublish.txt
in the obj\Release\Package\Logs
(from memory) directory
It doesn't work. I also tried to set EnablePackageProcessLoggingAndAssert
to true
, but the file AdditionalFilesToRemoveFromPublish.txt
is missing after publishing.
@rkeitel What version of HPP are you using, and what is your publishing target (package, filesystem, etc)?
Oh, and are you using packages.config or PackageReference?
@rkeitel Also, is DeleteExistingFiles
set to true
in your publish profile? HPP's remove additional files functionality only runs if WPP isn't going to just nuke everything (as there's be no point). There was also a bugfix for this behavior in 1.5.2
so make sure you're using at least that.
Also, be careful about commenting on closed issues since I might not see it. Create a new one if you're experiencing bugs that are supposed to be resolved.
This feature doesnt appear to remove any files from the webroot
Configuration can be found here https://github.com/muso31/Helixbase/blob/master/src/Website/code/Properties/PublishProfiles/Local.pubxml#L21