Exclude folder from deploy
I want to exclude a folder for deployment and I cant find a way to do so.
I have a folder 'logs' that I dont want to delete/update/add when i deploy, but i want to delete/update/add everything else.
Right now because in my publish doesnt exist the folder 'logs'(is excluded in publish) it will delete the folder in the server when deployed.
Thanks for your time.
there is not a dotnet deploy verb. Can you provide a repro?
To clarify, is when you use publish to azure in VS, it makes a dotnet publish and it is deployed, because the folder 'logs' is excluded, it is not in the publish folder, and when it compares with azure, it will mark it as deleted and try to erase it in azure.
i can manually acomplish to exclude any action to that folder, if i use the preview function and uncheck the folder, that makes the be something like this
msdeploy /* */ -skip:objectName=dirPath,absolutePath='.*■■■■■■\\logs' when finally executed
but the deploy takes time, and if i have to wait for the preview(double time) and then manual uncheck it everytime...
If it is not something related to cli, I apologize, sorry for my grammar.
@Angelixion I don't think this is related to the .NET Core CLI. @mlorbetske do you know what is the cause here?
@vijayrkn is there a way to set in the publish profile that a particular directory should be ignored?
If you are using VS 2017, then you can add this to the pubxml & provided path will be skipped from publishing.
<ItemGroup>
<MsDeploySkipRules Include="CustomSkip">
<ObjectName>filePath</ObjectName>
<AbsolutePath>logs\\</AbsolutePath>
</MsDeploySkipRules>
</ItemGroup>
@vijayrkn any chance we can make this more intuitive? And maybe more succinct?
cc @blackdwarf
This issue was moved to aspnet/websdk#239