title: PowerPoint file opens when C# WPF app is running from Visual Studio, but not from ClickOnce published version
body: <p>I have a WPF/C# application. It has a button that runs a particular PowerPoint presentation in slide show mode using the following code:</p>
  <pre><code>public bool OpenHelpFile()
  {
      ProcessStartInfo processStartInfo = new ProcessStartInfo();
      processStartInfo.FileName = &quot;powerpnt.exe&quot;;
      // the /S option starts PowerPoint in slide show mode
      processStartInfo.Arguments = &quot;/S \&quot;Resources\\Midas 3.pptx\&quot;&quot;;
      try { Process.Start(processStartInfo); }
      catch { return false; }
      return true;
  }
  </code></pre>
  <p>This works perfectly when I'm debugging in Visual Studio (2010), or even when running (not debugging) using the 'Release' solution configuration. However, after publishing the application using <code>ClickOnce</code>, the button no longer opens the presentation. Instead, I get this warning:</p>
  <p><img src="https://i.stack.imgur.com/l57qc.png" alt="Error message" /></p>
  <p>The presentation file is in a folder in the solution named 'Resources' and in its properties window, it has a <code>Build Action</code> of <code>None</code> and the <code>Copy To Output Directory</code> property is set to <code>Copy Always</code>. I believe that these settings <em>could</em> be the problem, but I'm not sure which options to use. Setting the <code>Build Action</code> to <code>Resource</code> didn't help because that embeds the file into an assembly from which PowerPoint cannot access the file.</p>
  <p>I have also searched the hidden <code>AppData</code> folder where <code>ClickOnce</code> applications are installed and could not find the presentation file there. The problem <em>could</em> also lie with <code>ClickOnce</code>. If anyone can shed some light on this problem, I would greatly appreciate it.</p>
  <p>Many thanks in advance.</p>
  <p>UPDATE&gt;&gt;&gt;</p>
  <p>I found a solution after reading the page that @Osama Javed's <strong>second</strong> link pointed to... ignore the first link.</p>
  <p>As it turned out, all I needed to do was to change the <code>Build Action</code> of the file to <code>Content</code>. This adds the file into the <code>Application Files</code> window (found in the Publish tab of the Project Properties page) where it could be included in the list of deployment files.</p>