Build VS2013 on a TFS Build Server With Only VS2013

后端 未结 4 1885
栀梦
栀梦 2020-12-13 04:41

I\'m setting up a new build server to support a migration of our development team from VS2010 to VS2013. We are not migrating our TFS server just yet so the new build server

相关标签:
4条回答
  • 2020-12-13 05:19

    You should be able to fix the Tools Version by editing the Build Template.

    Open the template .xaml file and find the "Run MsBuild for Project" activity. In the properties there is the option to set the tools version. If needed, you could create a template level property to make it easier to configure.

    enter image description here

    0 讨论(0)
  • 2020-12-13 05:32

    It is due to Vs2012 adding in csproj file this part:

      <PropertyGroup>
        <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
        <VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
      </PropertyGroup>
    

    You can safely remove that part and your solution will build.

    You have to ensure that the .proj file begin with <Project ToolsVersion="12" otherwise the next time you open the project with visual studio 2010, it will add the removed node again.

    otherwise if you need to use webdeploy or you use a build server the above solution will not work but you can specify the VisualStudioVersion property in your build script:

    msbuild myproject.csproj /p:VisualStudioVersion=12.0
    

    or edit your build definition:

    edit build definition to specify the <code>VisualStudioVersion</code> property

    0 讨论(0)
  • 2020-12-13 05:33

    What you could do is specify the VisualStudioVersion property when running msbuild on the build server

    msbuild myproject.csproj /p:VisualStudioVersion=12.0
    
    0 讨论(0)
  • 2020-12-13 05:38

    I ran into a similar issue...and here's why. Starting with VS2013, MSBuild is shipped as part of Visual Studio instead of the .NET Framework. Refer to this msdn blog.

    So to resolve my issue [the correct way], I had to use MSBuild from the "C:\Program Files (x86)\MSBuild\12.0\bin\" instead of "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\"

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