title: How to pass cmd line args to a published ClickOnce .NET Framework Console App
body: <p>After a .NET Framework console application is published out to a dev server, how do you run the .exe with command line args?</p>
  <p>For example, the application is published to \MYSERVER\path\to\published\app</p>
  <p>In that directory are the following files after publishing:</p>
  <ul>
  <li><code>Application Files</code> (directory with <code>*.deploy</code> files)</li>
  <li><code>MyApplication.application</code> (Application Manifest file)</li>
  <li><code>publish.htm</code></li>
  <li><code>setup.exe</code></li>
  </ul>
  <p>I have a few basic questions as I'm new to .NET and .NET Framework development</p>
  <ol>
  <li>Where is MyApplication.exe?</li>
  <li>I can run the application without command line arguments by simply running <code>D:path\to\app&gt;MyApplication.application</code>, when I call that file on the command line with arguments non of them seem to make it into the Main method. For ex: <code>D:path\to\app&gt;MyApplication.application arg1 arg2 arg3</code> why does the former work but not the latter?</li>
  <li>Am I naive in my approach, is there a better way to do this?</li>
  </ol>
  <p>I've tried finding the answer here but have been unsuccessful: <a href="https://docs.microsoft.com/en-us/visualstudio/deployment/publishing-clickonce-applications?view=vs-2019" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/visualstudio/deployment/publishing-clickonce-applications?view=vs-2019</a></p>