TFS 2010如何在带有VS 2012的Windows Server 2008的服务器上构建

时间:2014-08-04 05:42:31

标签: .net tfs msbuild tfs2010

我目前有一个构建盒,它是Windows Server 2008。 我们目前正在使用TFS 2010作为源代码控制。

我们开始的项目是在Visual Studio 2012中。当我尝试自动化构建时,我得到了一些公平的错误

C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1360,9): warning MSB3245: Could not resolve this reference. Could not locate the assembly "System.Net.Http". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [C:\Builds\1\Test MVC 4 Application\Build Development - MVC 4 Test App\Sources\Project\TestMVC4\MvcApplication1\MvcApplication1\MvcApplication1.csproj]
          For SearchPath "{Registry:Software\Microsoft\.NETFramework,v4.5.1,AssemblyFoldersEx}".
          Considered "C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\ReferenceAssemblies\v4.0\System.Net.Http.dll", but it didn't exist.
          Considered "C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\ReferenceAssemblies\v4.0\System.Net.Http.exe", but it didn't exist.
          Considered "C:\Program Files\Microsoft Visual Studio 10.0\ReportViewer\System.Net.Http.dll", but it didn't exist.
          Considered "C:\Program Files\Microsoft Visual Studio 10.0\ReportViewer\System.Net.Http.exe", but it didn't exist.
          Considered "C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\PublicAssemblies\System.Net.Http.dll", but it didn't exist.
          Considered "C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\PublicAssemblies\System.Net.Http.exe", but it didn't exist.
          Considered "C:\Program Files\Microsoft.NET\Primary Interop Assemblies\System.Net.Http.dll", but it didn't exist.
          Considered "C:\Program Files\Microsoft.NET\Primary Interop Assemblies\System.Net.Http.exe", but it didn't exist.
          Considered "C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\ReferenceAssemblies\v2.0\System.Net.Http.dll", but it didn't exist.
          Considered "C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\ReferenceAssemblies\v2.0\System.Net.Http.exe", but it didn't exist.
          Considered "C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\ReferenceAssemblies\v2.0\System.Net.Http.dll", but it didn't exist.
          Considered "C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\ReferenceAssemblies\v2.0\System.Net.Http.exe", but it didn't exist.
          Considered "C:\Program Files\Microsoft Visual Studio 10.0\ReportViewer\System.Net.Http.dll", but it didn't exist.
          Considered "C:\Program Files\Microsoft Visual Studio 10.0\ReportViewer\System.Net.Http.exe", but it didn't exist.
          Considered "C:\Program Files\Common Files\Microsoft Shared\MSEnv\PublicAssemblies\System.Net.Http.dll", but it didn't exist.
          Considered "C:\Program Files\Common Files\Microsoft Shared\MSEnv\PublicAssemblies\System.Net.Http.exe", but it didn't exist.
          Considered "C:\Program Files\Microsoft Chart Controls\Assemblies\System.Net.Http.dll", but it didn't exist.
          Considered "C:\Program Files\Microsoft Chart Controls\Assemblies\System.Net.Http.exe", but it didn't exist.
          For SearchPath "{GAC}".
          Considered "System.Net.Http", which was not found in the GAC.
          For SearchPath "{RawFileName}".
          Considered treating "System.Net.Http" as a file name, but it didn't exist.
          For SearchPath "C:\Builds\1\Test MVC 4 Application\Build Development - MVC 4 Test App\Binaries\".
          Considered "C:\Builds\1\Test MVC 4 Application\Build Development - MVC 4 Test App\Binaries\System.Net.Http.dll", but it didn't exist.
          Considered "C:\Builds\1\Test MVC 4 Application\Build Development - MVC 4 Test App\Binaries\System.Net.Http.exe", but it didn't exist.
  Primary reference "System.Net.Http.WebRequest".

我认为这是因为我需要使用visual studio 2012更新构建服务器。但是当我尝试安装它时,它说服务器已经过时并且不支持visual studio 2012 ...有没有选择?或者我必须只更新服务器?我相信其他人会在

之前遇到过这个问题

1 个答案:

答案 0 :(得分:0)

如果查看日志的最后几行,您会看到MSBuild正在项目中查找程序集。因此,您可以将缺少的DLL添加到二进制文件夹中,并将其签入到源代码管理中。