Get minor and major version from MSBUILD script

后端 未结 3 1469
借酒劲吻你
借酒劲吻你 2020-12-15 11:20

I\'m using Msbuild to compile and generate .zip files and installers and I need the version number of my assembyInfo.

I\'m using this code.



        
3条回答
  •  無奈伤痛
    2020-12-15 12:05

    If you're using MsBuild 4.0 you can write your own inline custom Task to get this done.

    
    
      
        
        
        
        
      
      
        
        
          
        
      
    
    

    and then reference the inline task elsewhere in your build script...

    
      
      
      
    
    

    Using the inline Task, you have can have easy access to each part of the assembly's build number. e.g $(MajorVersionNumber)

提交回复
热议问题