title: How to use MsBuild MsDeployPublish to target local file system?
body: <p>I'm trying to replicate the Visual Studio 2010 "Publish..." command (applicable to Web Application projects) where I would in the UI choose Publish Method: "File System".</p>
  
  <p>My attempt at this is...</p>
  
  <blockquote>
    <p>%msbuild% /t:MsDeployPublish /property:MsDeployServiceUrl="file:///d:\MyDeploymentFolder";MsDeployPublishMethod="File System" "d:\MySourceFolder\Project.csproj"</p>
  </blockquote>
  
  <p>... and having tried a method of "FileSystem", "File System", "Local", and a few others.</p>
  
  <p>The error I get implies that MsDeploy is still trying to push to an IIS server:</p>
  
  <pre><code>"D:\MySourceFolder\Project.csproj" (MsDeployPub
  lish target) (1) -&gt;
  (MSDeployPublish target) -&gt;
    C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web
  .Publishing.targets(3847,5): error : Web deployment task failed.(The metabase k
  ey '/lm/w3svc' could not be found.) [D:\MySourceFolder\Project.csproj]
  C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.P
  ublishing.targets(3847,5): error : \r [D:\MySourceFolder\Project.csproj]
  C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.P
  ublishing.targets(3847,5): error : The metabase key '/lm/w3svc' could not be fo
  und.\r [D:\MySourceFolder\Project.csproj]
  C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.P
  ublishing.targets(3847,5): error : Unable to access the IIS configuration syste
  m. Please make sure you have IIS 7 (or later) installed.\r [D:\MySourceFolder\Project.csproj]
  C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.P
  ublishing.targets(3847,5): error : Retrieving the COM class factory for compone
  nt with CLSID {2B72133B-3F5B-4602-8952-803546CE3344} failed due to the followin
  g error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REG
  DB_E_CLASSNOTREG)). [D:\MySourceFolder\Project.csproj]
  </code></pre>
  
  <p><strong>How can I target the file system for deployment, as Visual Studio normally lets me in the GUI?</strong></p>