Post-Build powershell - help getting syntax (spaces help)
<p>Running a post-build powershell command and my path has spaces as does the two args I'm trying to pass.  I have no idea how to get this to work.  One of the issues is a fun little double-quote that is showing up.  Ultimately the following is what I'm looking for........</p>

<pre><code>powershell -file "$(ProjectDir)PS\upgradeApp.ps1" -projDir "$(ProjectDir)" -targetDir "$(TargetDir)"
</code></pre>

<p>Note -- projDir has spaces as does targetDir.  Fine, let's just get the first arg....</p>

<pre><code>powershell -file "$(ProjectDir)PS\upgradeApp.ps1" -projDir "$(ProjectDir)"
</code></pre>

<p>What happens then is I'm mysteriously left with a trailing double-quote for the projectDir arg.  Why?</p>

<pre><code>C:\Users\user.domain\Documents\Visual Studio 2015\Projects\WikiAdditions\WikiAdditions"
</code></pre>

<p>I've tried putting in single quotes, then double-quotes but then I get a trailing single quote.  So what's the magic formula here?</p>