source monitor - Trouble launching sourcemonitor from MSbuild script? -


my test folder set follows:

enter image description here

i have ran source monitor on own command line , runs completion , outputs .xml files need ci process.

below .proj file trying run:

<?xml version="1.0" encoding="utf-8"?> <project toolsversion="4.0" defaulttargets="analyze" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <propertygroup>   <msbuildcommunitytaskspath>.</msbuildcommunitytaskspath> </propertygroup>   <import project="msbuild.community.tasks.targets"/>    <target name="analyze">       <exec command="sm.exe /c sm-commands.xml"/>      <xmlread xpath="//*/metric[@id='m0']" xmlfilename="sm-summary.xml">       <output taskparameter="value" propertyname="numberoflines" />     </xmlread>     <teamcityreportstatsvalue key="numberoflines" value="$(numberoflines)" />      <xmlread xpath="//*/metric[@id='m5']" xmlfilename="sm-summary.xml">       <output taskparameter="value" propertyname="methodsperclass" />     </xmlread>     <teamcityreportstatsvalue key="methodsperclass" value="$(methodsperclass)" />      <xmlread xpath="//*/metric[@id='m7']" xmlfilename="sm-summary.xml">       <output taskparameter="value" propertyname="statementspermethod" />     </xmlread>     <teamcityreportstatsvalue key="statementspermethod" value="$(statementspermethod)" />      <xmlread xpath="//*/metric[@id='m10']" xmlfilename="sm-summary.xml">       <output taskparameter="value" propertyname="maxcomplexity" />     </xmlread>     <teamcityreportstatsvalue key="maxcomplexity" value="$(maxcomplexity)" />      <xmlread xpath="//*/metric[@id='m14']" xmlfilename="sm-summary.xml">       <output taskparameter="value" propertyname="avgcomplexity" />     </xmlread>     <teamcityreportstatsvalue key="avgcomplexity" value="$(avgcomplexity)" />       </target> </project> 

i following error:

enter image description here

research link:article following

exit code 1 not helpful. try prepending command start cmd /k (it'll escape msbuild's sandbox redirect new cmd window) , see if prints else. 1 possibility errorlevel 1 msbuild closing input stream if sc.exe interactive , needs read user terminate exit code 1.

also, after manually "ran completion successfully", did check exit code echo %errorlevel%? might exit quietly , output files still technically fail non-0 exit code.


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -