Is it possible to configure TeamCity to use the MSBuild that ships with Visual Studio 2015?

前端 未结 3 1742
无人及你
无人及你 2021-02-19 13:39

I\'m attempting to build an ASP.NET vNext project in TeamCity. When it tries to build, I get the following error:

C:\\...\\MyApp.kproj(7, 3): error MSB4019: The i

3条回答
  •  忘掉有多难
    2021-02-19 14:14

    Edit: As of TeamCity 9.x, all works out of the box, but for earlier versions, the below is a solution.

    The project import problem should be solved by setting a env.VSToolsPath environment property to C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0.

    However, you will not be able to build using the TeamCity included MSBuild runner. But using a command-line runner is very simple. I extracted a meta-runner like this. It has almost the same functionality as the included TeamCity MSBuild 2013 runner. If you need more configurability, just add more parameters.

    My meta-runner ended up looking like this:

    
    
      MSBuild 2015 command line runner
      
        
          
          
        
        
          
            
              
              
              
            
          
        
        
      
    
    

    Note: TeamCity 9.1, due for Q2 2015 is expected to build VS2015 projects natively.

提交回复
热议问题