sdk icon indicating copy to clipboard operation
sdk copied to clipboard

Exclude folder from deploy

Open Angelixion opened this issue 10 years ago • 7 comments

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.

Angelixion avatar Jun 06 '16 12:06 Angelixion

there is not a dotnet deploy verb. Can you provide a repro?

TheRealPiotrP avatar Jun 06 '16 17:06 TheRealPiotrP

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 avatar Jun 10 '16 07:06 Angelixion

@Angelixion I don't think this is related to the .NET Core CLI. @mlorbetske do you know what is the cause here?

thesmithee avatar Jan 17 '17 21:01 thesmithee

@vijayrkn is there a way to set in the publish profile that a particular directory should be ignored?

mlorbetske avatar Jan 17 '17 23:01 mlorbetske

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 avatar Jan 18 '17 05:01 vijayrkn

@vijayrkn any chance we can make this more intuitive? And maybe more succinct?

cc @blackdwarf

livarcocc avatar Jan 18 '17 06:01 livarcocc

This issue was moved to aspnet/websdk#239

livarcocc avatar Sep 14 '17 22:09 livarcocc