Using MSBuild to Build Multiple Configurations

后端 未结 3 1314
太阳男子
太阳男子 2020-12-05 05:01

I\'m trying to edit my project file to enable me to have a project that builds multiple build configs at once. I\'ve done this using a batching approach and using the MSBuil

3条回答
  •  一个人的身影
    2020-12-05 05:46

    I am not quite sure if I'd wanna go through such a convoluted configuration of the project's csproj file itself. I'd rather setup a separate MSBuild "BuildBoth.proj" file that has a specific target called "Both" that builds the solution in both configurations.

    
    
        
        
            
            
    
            
            
        
    
        
    
    
    

    Then I'd run the command (verbosity set Minimal) to target Both

    C:\Projects\experiments\BuildBoth>msbuild /v:m /target:Both BuildBoth.proj
    Microsoft (R) Build Engine Version 4.0.30319.1
    [Microsoft .NET Framework, Version 4.0.30319.225]
    Copyright (C) Microsoft Corporation 2007. All rights reserved.
    
      BothWpf -> C:\Projects\experiments\BuildBoth\BothWpf\bin\Debug\BothWpf.exe
      BothWpf -> C:\Projects\experiments\BuildBoth\BothWpf\bin\Release\BothWpf.exe
    

提交回复
热议问题