title: Can not use ClickOnce publish on .NET 4.0 application from Visual Studio 2012
body: <p>I installed Visual&nbsp;Studio&nbsp;2012 and went to go publish one of our applications, that is targeted at the .NET 4.0 framework. Due to the setup on these machines, we can not target 4.5 at this time. We are also using the 'Download prerequisites from the same location as my application' feature.</p>
  
  <p>When going to deploy from Visual&nbsp;Studio&nbsp;2012, I get the following error:</p>
  
  <blockquote>
    <p>To enable 'Download prerequisites from the same location as my
    application' in the Prerequisites dialog box, you must download file
    'DotNetFX40\dotNetFx40_Full_x86_x64.exe' for item 'Microsoft .NET
    Framework 4 (x86 and x64)' to your local machine. For more
    information, see <a href="http://go.microsoft.com/fwlink/?LinkId=239883" rel="nofollow">http://go.microsoft.com/fwlink/?LinkId=239883</a>.</p>
  </blockquote>
  
  <p>If you go to that link, it tells you to navigate to the Package.xml file, and find the link for the actual prerequisite. In my case, it should go to <a href="http://go.microsoft.com/fwlink/?linkid=182805" rel="nofollow">http://go.microsoft.com/fwlink/?linkid=182805</a>. Using that link it downloaded a package named dotNetFx40_Full_setup.exe. I placed this in the <code>/Packages/DotNetFX40</code> folder.</p>
  
  <p>When trying to publish again from Visual&nbsp;Studio&nbsp;2012, I got the same error. It seems that it does not like this file.</p>
  
  <p>If I publish the same application to the same location with Visual&nbsp;Studio&nbsp;2010 now, it still works just fine.</p>
  
  <p>How can I get this to work with Visual&nbsp;Studio&nbsp;2012?</p>