How can I use a batch file to MSBuild solutions in multiple directories at once?

后端 未结 1 1707
深忆病人
深忆病人 2021-01-06 14:34

I am an intern with a start-up company. I don\'t know anything about Batch files, XML files, the command prompt, or msbuild. I only know the basics of C#.

I have bee

1条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-06 15:24

    1. Save following targets file as buildall.targets in the root of your solutions directory

      
      
          
              
          
      
          
               
          
      
       
      
    2. Create batch file named BuildAll.cmd with following content: (change path to msbuild.exe depends on .NET Framework version you are using)

      C:\Windows\Microsoft.NET\Framework64\v4.0.30319\msbuild buildall.targets
      
    3. Run/execute BuildAll.cmd

    See MSDN: How to: Select the Files to Build for more details on recursive folder traversal, especially "Specifying Inputs with Wildcards" part

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