MSBuild exec task, exit code empty

后端 未结 1 1089
栀梦
栀梦 2021-01-12 05:42

I have the following exec task, performing checkin of assemblyinfo.cs files. I\'m trying to return the exit code, but for some reason it is always empty.

&l         


        
1条回答
  •  北海茫月
    2021-01-12 06:10

    In general it works as you have shown.

    For reference, here is a more "selfcontained" example:

    
      
        
           
        
        
      
    
    

    A couple of things you may want to consider however:

    • Make sure your Exec even executes, that is Condition evaluates to True.

    • Output the ErrorCode property using the Message-Task, to see if it is actually set (to the value you expect). However, make sure MSBuild will show the output, by either using Importance='high' or by running msbuild.exe /v:d to enable detailed messages.

    0 讨论(0)
提交回复
热议问题