Visual Studio builds solution but MSBuild from the command line fails
<p>I've seen a number of posts on this subject but none really seem to address my specific error/situation (or at least the solutions haven't worked yet). I can build my solution just fine in Visual Studio, but using the following command line statement fails. </p>

<pre><code>msbuild Project.sln /t:Build /p:RunOctoPack=true
</code></pre>

<p>I get 21 errors in total, each one similar to those I've posted below (Invalid Token).  </p>

<blockquote>
  <p>ApplicationConfiguration\ApplicationSessionService.cs(19,30): error CS1002: ; e
  xpected [C:\Projectstuff\Project.Common\Project.Common.csproj]
  ApplicationConfiguration\ApplicationSessionService.cs(19,54): error CS1519: Inv
  alid token '!=' in class, struct, or interface member declaration [C:\Projectstuff\Project.Common\Project.Common.csproj]
  Events\UsbDeviceChanged.cs(48,46): error CS1056: Unexpected character '$' [C:\Projectstuff\Project.Common\Project.Common..Common.csproj]</p>
</blockquote>

<p>The project is built with .Net 4.5.2, however I noticed this is one of the first output lines in the command window. Again, this builds in Visual Studio 2015 Community Edition and I know I have the .Net 4.5.2 framework on my machine, so not sure if this matters or not. </p>

<blockquote>
  <p>CoreCompile:
    C:\windows\Microsoft.NET\Framework64\v4.0.30319\Csc.exe</p>
</blockquote>