title: Error launching application after ClickOnce deployment- An application for this deployment is already installed with a different application identity
body: <p>As part of my continuous integration build the application is deployed as a ClickOnce application. This works great the first time, but when I try the launch the app after an update has been deployed I get the following error.</p>
  
  <blockquote>
    <p>An application for this deployment is
    already installed with a different
    application identity.</p>
  </blockquote>
  
  <p>If I run <code>mage.exe -cc</code> to clear the application cache for all ClickOnce apps then I can launch the application just fine.</p>
  
  <p>Has anyone run into this before? How can I fix this?</p>
  
  <p>Here are the steps in my build script that publish the ClickOnce application.</p>
  
  <pre><code>./tools/windows_sdk/mage.exe
      -New Application
      -Processor msil
      -ToFile "C:\temp\build\RoadrunnerTrap.exe.manifest"
      -Name "Roadrunner Trap"
      -Version 1.0.0.1
      -FromDirectory "C:\temp\build"
  
  # artifacts from C:\temp\build\ are copied to \\server\publish\v1.0.0.1\
  
  ./tools/windows_sdk/mage.exe
      -New Deployment
      -Processor msil
      -Install false
      -Publisher "Acme, Inc."
      -ProviderUrl "\\server\publish\RoadrunnerTrap.application"
      -Name "Roadrunner Trap"
      -AppManifest "\\server\publish\v1.0.0.1\RoadrunnerTrap.exe.manifest"
      -ToFile "\\server\publish\RoadrunnerTrap.application"
  </code></pre>
  
  <p>Note that the version number does change with every deployment.</p>