WiX Heat Pre-build Error
<p>I have a WiX installer that was working fine, but it's been a few months since I worked on it... so, I am not attempting to build the installer (on a reconfigured machine) and now it fails to build every time.  I've tried to simplify everything to isolate where it's failing, but I still can't seem to figure out why.  Essentially, it looks like it's failing at the pre-build process.  I had a length Pre-build Event command, but I've simplified it to the bare essentials.  Here's my command:</p>

<pre><code>call “$(WIX)bin\heat.exe” dir "$(SolutionDir)MyProj\bin\Release" -out “$(ProjectDir)MyFiles.wxs”
</code></pre>

<p>The error I'm getting is:</p>

<pre><code>call “C:\Program Files (x86)\WiX Toolset v3.10\bin\heat.exe” dir "C:\Users\MyName\Documents\GitHub\MyProj\bin\Release" -out “C:\Users\MyName\Documents\GitHub\MyProj\Installer\MyFiles.wxs”
The filename, directory name, or volume label syntax is incorrect.
</code></pre>

<p>The code appears to exit with code 1, which seems to suggest that it's failing to locate a filename or path... however, I've checked the paths that are printed in the output log and the heat.exe application does exists under the C:\Program Files (x86) directory.  The directory (dir) it's trying to harvest is properly defined and the output location is as well.  So, does anyone know why this is failing?</p>

<p><strong>Update</strong></p>

<p>What's incredibly strange is that the pre-build event command seems to fail even when I simplify the command to try to simply call the heat.exe application (with no other parameters). I tried changing my pre-build event to the following:</p>

<pre><code>call “C:\Program Files (x86)\WiX Toolset v3.10\bin\heat.exe”
</code></pre>

<p>As you can see from the attached image, the heat.exe application is indeed located in the directory specified in the build command. Yet, I still get an error saying that the MSBuild failed and exited with code 1.  If I check the output log, it says that the, "filename, directory name, or volume label syntax is incorrect".  However, I can say that this installer was working properly a few months ago with no changes to the build events... so I really don't know why it wouldn't work now, except that I had to reconfigure my machine and reinstall Windows 10 recently.  I downloaded and installed the latest WiX toolset, and would assume that would be everything that is needed.  But, this error persists.  Any ideas?</p>

<p><a href="https://i.stack.imgur.com/qYYwQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qYYwQ.png" alt="enter image description here"></a>  </p>