title: Web Deploy - Using Relative Paths for local file system deployment
body: <p>I am wanting to use Web Deploy to run a custom deployment setup.</p>
  
  <p>As I am wanting to have this work fine when running on many different environments (team members local machines, 4 different builds servers) I want to deploy to a local path that is relative.</p>
  
  <p>What I am wanting to do is:</p>
  
  <ul>
  <li>Deploy to a local <em>relative</em> path</li>
  <li>Have the after build step do magical things...</li>
  </ul>
  
  <p>However when i enter the local file path to deploy to as: "..\Deploy_Production"</p>
  
  <p>web deploy complains with this:</p>
  
  <pre><code>2&gt;Connecting to ..\Deploy_Live...
  2&gt;Unable to create the Web site '../Deploy_Live'.  The URL http://:0 is invalid.
  </code></pre>
  
  <p>Its as if Web deploy thinks that the relative file path is a website URL. Using "..\" instead doesn't help my cause.</p>
  
  <p>How do you get WebDeploy to deploy to a local <em>relative</em> path?</p>
  
  <p><strong>Edit 1:</strong></p>
  
  <p>I have tried to use a ConvertToAbsolutePath task before build, to no avail:</p>
  
  <pre><code>  &lt;PropertyGroup&gt;
      &lt;WebPublishMethod&gt;FileSystem&lt;/WebPublishMethod&gt;
      &lt;SiteUrlToLaunchAfterPublish&gt;http://mywebsite.com&lt;/SiteUrlToLaunchAfterPublish&gt;
      &lt;publishUrl&gt;..\Deploy_Production&lt;/publishUrl&gt;
      &lt;DeleteExistingFiles&gt;False&lt;/DeleteExistingFiles&gt;
    &lt;/PropertyGroup&gt;
  
    &lt;Target Name="BeforeBuild"&gt;
      &lt;ConvertToAbsolutePath Paths="$(publishUrl)"&gt;
        &lt;Output TaskParameter="AbsolutePaths" PropertyName="publishUrl" /&gt;
      &lt;/ConvertToAbsolutePath&gt;
    &lt;/Target&gt;
  </code></pre>
  
  <p><strong>Edit 2:</strong>
  The above works, but <em>only</em> when running commandline builds against the <em>Solution</em> file not a <em>project</em> file</p>