Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>It is possible, however, not merely on the command line. You'd have to build a custom <code>DeploymentRuleHandler</code>, like this:</p> <pre><code>namespace CustomRuleHandlers { using Microsoft.Web.Deployment; [DeploymentRuleHandler] internal class IgnoreFileAttributesRuleHandler : DeploymentRuleHandler { public override int CompareAttribute(DeploymentSyncContext syncContext, DeploymentObject destinationObject, DeploymentObjectAttribute destinationAttribute, DeploymentObject sourceObject, DeploymentObjectAttribute sourceAttribute, int currentComparison) { if ((destinationObject.Name.Equals("filePath", StringComparison.Ordinal)) &amp;&amp; destinationAttribute.Name.Equals("attributes", StringComparison.Ordinal)) { return 0; } return currentComparison; } public override string Description { get { return "Ignores file attributes when determining if a file should be synched or not."; } } public override string FriendlyName { get { return "IgnoreFileAttributes"; } } public override string Name { get { return "IgnoreFileAttributes"; } } public override bool EnabledByDefault { get { return false; } } } } </code></pre> <p>Compile that into an assembly (targeting .Net 3.5 for WebDeploy v2!) and put the assembly into the "Extensibility" subfolder in the WebDeploy folder (normally, <code>C:\Program Files\IIS\Microsoft Web Deploy V2\Extensibility</code>).</p> <p>Then, you can easily leverage your custom rule when running msdeploy from the command-line by adding this argument:</p> <pre><code>-enableRule:IgnoreFileAttributes </code></pre> <p>Of course, that assembly needs to be present on both, the source and the target machine, of a sync operation.</p> <p>Unfortunately, there's no easier way of getting there!</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload