Closed rkeitel closed 5 years ago
Is your profile's publishUrl a file path or a web address? The feature is implicitly only supported if it's a file path
The publishUrl is a file path.
Argh, you're killing me 🤣
I'll try to take a look, but if you could create a small repro and email it to me (richard@richardszalay.com) it will make diagnosing/fixing it quicker.
I can't create a repo because it is a customer project. But here you have the relevant configuration files: Testsite.zip
@rkeitel Thanks for raising this, I can reproduce. For what it's worth, if you enable autopublish you won't hit this problem (which is why I've never seen it before)
For now you can use the following workaround at the end of your Local.pubxml:
<!-- Temporary workaround for https://github.com/richardszalay/helix-publishing-pipeline/issues/62 -->
<Target Name="_CollectAdditionalFilesToRemoveFromTarget"
Condition="'$(BuildingInsideVisualStudio)' == 'true'"
DependsOnTargets="CollectAdditionalFilesToRemoveFromTarget"
BeforeTargets="_CopyWebApplication" />
Summary:
When expicitly publishing within VS the IDE's internal optimisations mean that a number of targets don't get run. Since appears to include WebFileSystemPublish, CollectAdditionalFilesToRemoveFromTarget never runs.
I think this hasn't been raised before because autopublish is not affected by it since it runs the targets by name. Still, we should create a new ticket that verifies each of the features when publishing from within VS.
Cool, the workaround works great. Thank you very much :-)
Excellent. I'll keep this issue open until I release a new version with the fix.
I noted another problem. Deleting additional assemblies is working (e.g. <TargetPath>bin\Testsite.Feature.*</TargetPath>
), but removing additional configs is still not working (e.g. <TargetPath>App_Config\Include\Feature\**</TargetPath>
).
I'm not sure if that glob is valid. Have you tried App_Config\Include\Feature\**\*.config
?
Yes, I tried App_Config\Include\Feature\*.config
, but it is not working.
App_Config\Include\Feature\*.config
won't work unless the files aren't in any subfolders
App_Config\Include\Feature\**
won't work because it will only match directories.
Can you try App_Config\Include\Feature\**\*.config
?
All files are in App_Config\Include\Feature
without subfolders, so App_Config\Include\Feature\*.config
should be the right one.
Interesting. Ok, let try to reproduce.
Even using your original config of App_Config\Include\Feature\**
(+ the workaround I posted above), I can't actually reproduce this problem. For me, the extra config files go away when I publish via the VS dialog. I comment out the lines in Local.pubxml and reload the project (which is required, btw) then it stops doing it.
I've attached the sample project I used (which is just Helixbase with your config). Can you try it and see if you can reproduce it?
You are right. The problem was that my App_Config folder had wrong security permissions. So all problems are solved. Thank you very much :-)
Ah good news. I'll close this issue once I've published a new version with the first fix.
Included in the v1.5.5 release
This feature doesn't appear to remove any files from the web root. See issue 52.
I'm using version 1.5.4 of HPP. The publishing target is the local file system. The VS project uses package references.
DeleteExistingFiles
is set tofalse
.EnablePackageProcessLoggingAndAssert
is set totrue
, but the log fileAdditionalFilesToRemoveFromPublish.txt
is not created inobj\Release\Package\Logs
.