tag:help.appveyor.com,2012-11-13:/discussions/problems/3920-msbuild-in-powershellAppVeyor: Discussion 2018-10-19T08:17:41Ztag:help.appveyor.com,2012-11-13:Comment/388145132016-01-02T07:34:01Z2016-01-02T07:34:01ZMSBUILD in Powershell<div><p>Just switched my <code>build_script</code> from CMD to PS:</p>
<p>this is what I have, but it fails.</p>
<p>How to fix this?</p>
<pre>
<code>environment:
buildconfig: Release
azureconfig: Local
solutionname: Gene.sln
build_script:
- ps: >-
cd src
&msbuild.exe $solutionname /t:Rebuild /p:Configuration=$env:buildconfig;TargetProfile=$env:azureconfig /verbosity:minimal
cd..</code>
</pre></div>jezz.santostag:help.appveyor.com,2012-11-13:Comment/388145132016-01-02T07:52:58Z2016-01-02T07:52:58ZMSBUILD in Powershell<div><p>Try this:</p>
<pre>
<code>build_script:
- ps: |
cd src
msbuild.exe $solutionname /t:Rebuild /p:Configuration=$env:buildconfig;TargetProfile=$env:azureconfig /verbosity:minimal
cd..</code>
</pre></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/388145132016-01-02T07:57:35Z2016-01-02T07:57:35ZMSBUILD in Powershell<div><p>Yay! that got me to this point!</p>
<p>Is there something else I need to do to the arguments of that
msbuild line?</p>
<p>(sorry, not skilled at PS)</p></div>jezz.santostag:help.appveyor.com,2012-11-13:Comment/388145132016-01-02T08:02:56Z2016-01-02T08:02:56ZMSBUILD in Powershell<div><p>Try this:</p>
<pre>
<code>msbuild.exe $solutionname /t:Rebuild "/p:Configuration=$env:buildconfig;TargetProfile=$env:azureconfig" /verbosity:minimal</code>
</pre></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/388145132016-01-02T08:07:02Z2016-01-02T08:07:02ZMSBUILD in Powershell<div><p>awesome thanks. That was killing me!!!</p></div>jezz.santos